GL Studio C++ Runtime API
Mutex::ScopedTryLock Class Reference

A lock to automagically try to lock and, if applicable, unlock a mutex within its scope. More...

#include <gls_mutex.h>

Public Member Functions

 ScopedTryLock (Mutex &mut)
 
bool IsLocked () const
 
 ~ScopedTryLock ()
 Releases the mutex automatically, if needed.
 

Detailed Description

A lock to automagically try to lock and, if applicable, unlock a mutex within its scope.

Constructor & Destructor Documentation

◆ ScopedTryLock()

ScopedTryLock ( Mutex mut)
inline

Tries to lock the given mutex.

Parameters
mutThe mutex to lock.

Member Function Documentation

◆ IsLocked()

bool IsLocked ( ) const
inline
Returns
Whether or not the lock succeeded.

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