Lockclass encapsulates a shared lock object for multithreaded synchronization.
||Acquires exclusive access to a lock.|
||Releases exclusive access to a lock.|
||Acquires shared access to a lock.|
||Releases shared access to a lock.|
Lockclass defines a platform-independent shared lock object that can be used for multithreaded synchronization. A lock object can be acquired for exclusive access by a single thread, or it can be acquired for shared access by multiple threads simultaneously. Exclusive access is ordinarily required when a thread is going to write to a shared resource, and shared access is ordinarily sufficient when multiple threads only need to read from a shared resource.
WARNING. If a lock object is destroyed while a thread is waiting on it, then the behavior is undefined.