[physfs] Mounting files & CD checking
darkuranium at gmail.com
Tue Jul 7 11:11:14 EDT 2009
That's exactly what I'm trying to avoid, the wait if you've just inserted
2009/7/6 Ryan C. Gordon <icculus at icculus.org>
> I mean, can I use it from a different thread to create a "non-blocking"
>> listing - so that the program doesn't get blocked while the CD unit spins up
> GetCdRomDirs() doesn't hold a mutex, and it _should_ be thread safe,
> presuming the OS-specific APIs are, as well...so it probably won't block.
> I can't say with certainty, but I'm pretty sure most platforms don't access
> the CD-ROM during this call...at least Linux, Mac OS X, and Windows already
> know what discs are mounted, and provide this information to the application
> without having to go back to the hardware.
> I suppose that Windows _might_ block if you put a disc in the drive at the
> exact moment you called getCdRomDirs(), but I think that's probably
> acceptable to the end-user. It shouldn't block when the drive definitely
> does or does not have a disc, though, as Windows spun it up already before
> you asked. Mac OS X and Linux should be safe at any rate.
> physfs mailing list
> physfs at icculus.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the physfs