Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::UniqueLock Class Reference

In addition to providing RAII-style locking, UniqueLock also allows for deferred locking until lock() is called explicitly. unlock() is only called by the destructor if the object has locked the mutex. Based on boost::unique_lock, assumes the Mutex will outlive the lock. More...

#include <mitsuba/core/lock.h>

Public Member Functions

 UniqueLock (Mutex *mutex, bool acquire_lock=true)
 
 ~UniqueLock ()
 
void lock ()
 
void unlock ()
 
Mutexrelease ()
 
bool operator! () const
 
bool ownsLock () const
 

Detailed Description

In addition to providing RAII-style locking, UniqueLock also allows for deferred locking until lock() is called explicitly. unlock() is only called by the destructor if the object has locked the mutex. Based on boost::unique_lock, assumes the Mutex will outlive the lock.

Constructor & Destructor Documentation

mitsuba::UniqueLock::UniqueLock ( Mutex mutex,
bool  acquire_lock = true 
)
inlineexplicit
mitsuba::UniqueLock::~UniqueLock ( )
inline

Member Function Documentation

void mitsuba::UniqueLock::lock ( )
inline
bool mitsuba::UniqueLock::operator! ( ) const
inline
bool mitsuba::UniqueLock::ownsLock ( ) const
inline
Mutex* mitsuba::UniqueLock::release ( )
inline
void mitsuba::UniqueLock::unlock ( )
inline

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