C4 Engine
C4 Engine API Documentation

Lock::AcquireShared

Defined in:  C4Threads.h
Acquires shared access to a lock.
Prototype

void AcquireShared(void);

Description
The AcquireShared function acquires shared access to a lock. If exclusive to the lock has already been acquired by another thread at the time this function is called, then the calling thread blocks until the exclusive access has been released. However, all other shared acquisitions of the lock will succeed without blocking.

To balance each call to the AcquireShared function, shared access to a lock must be relinquished by calling the Lock::ReleaseShared function when the calling thread no longer needs the lock.
See Also

Lock::ReleaseShared

Lock::AcquireExclusive

Lock::ReleaseExclusive