DiCE API nvidia_logo_transpbg.gif Up
mi::base::Lock Class Reference

Non-recursive lock class. More...

#include <lock.h>

Classes

class  Block
 Utility class to acquire a lock that is released by the destructor. More...
 

Public Member Functions

 Lock ()
 Constructor. More...
 
 ~Lock ()
 Destructor. More...
 

Protected Member Functions

void lock ()
 Locks the lock. More...
 
bool try_lock ()
 Tries to lock the lock. More...
 
void unlock ()
 Unlocks the lock. More...
 

Detailed Description

Non-recursive lock class.

The lock implements a critical region that only one thread can enter at a time. The lock is non-recursive, i.e., a thread that holds the lock can not lock it again. Any attempt to do so will abort the process.

Other pre- and post-conditions are checked via mi_base_assert.

See also
mi::base::Lock::Block