[physfs] physfs nonblocking bluesky.

Ryan C. Gordon icculus at clutteredmind.org
Thu Dec 18 17:47:37 EST 2003


> Hmm, okay.  I presume that's physical-filehandles rather than
> physfs-filehandles.  In that case guess it could be hard to tell
> from the application level whether any two given physfs-filehandles
> happen to correspond to the same physical-filehandle and thus
> potentially be problematic, though.

Generally, it's a one-to-one mapping (one OS-level file handle per
PHYSFS_file handle). Obviously, the "dir.c" archiver gets an OS-level
file handle for each file you open, but things like zipfiles will open()
(or whatever) the archive itself each time you open an entry in the
archive so that every "file" you read has it's own handle, even though
they are all reading from the same physical file. This is actually quite
inexpensive on every OS I've tried, and makes thread safety and other
issues much cleaner inside the library.

In short, there's no need to panic.  :)

--ryan.






More information about the physfs mailing list