GL Studio C++ Runtime API
Mutex Class Reference

#include <gls_mutex.h>

Classes

class  ScopedLock
 A lock class to automagically un/lock a mutex within its scope. More...
 
class  ScopedTryLock
 A lock to automagically try to lock and, if applicable, unlock a mutex within its scope. More...
 

Public Member Functions

 Mutex ()
 Constructor.
 
virtual ~Mutex ()
 Destructor.
 
void Lock ()
 Blocks to acquire the mutex.
 
bool TryLock ()
 
void Unlock ()
 Releases the mutex, allowing another process to lock it.
 

Detailed Description

Provide a cross platform Mutex class to provide data locking capability in a multithreaded environment. Uses the pimpl idiom to hide details.

Member Function Documentation

bool TryLock ( )

Attemps to acquire the mutex without blocking

Returns
whether the lock succeeded

The documentation for this class was generated from the following file: