logog
logger optimized for games
|
The Mutex object is responsible for multithread safety in logog. All platforms support a Mutex object. Only one thread may acquire a Mutex object at one time. Other threads fall into a wait state until the locking thread releases the Mutex.
The ScopedLock object is a convenient way to represent a Mutex lock as part of an object's auto scope. To use a ScopedLock, create a Mutex lock on a known thread, then create a ScopedLock with the previously defined Lock as a parameter. Code is guaranteed to be single threaded within the scope of the ScopedLock.