PistonDevelopers/physfs-rs — pull request #4 by EnvisionRed (2014-08-04 06:22:28+00:00)
Title: Lock only when needed, not until context deallocation.

Previously, the PhysFSContext struct would acquire the global PHYSFS_LOCK in its constructor and release it in its destructor, making it impossible to have multiple PhysFSContexts instantiated at the same time. Now, the lock is acquired before physfs functions are called, and released when it goes out of scope. This preserves thread-safety while allowing multiple PhysFSContexts to be created.
Additionally fixes https://github.com/PistonDevelopers/physfs-rs/issues/3