fw4spl
fwData::mt::ObjectReadToWriteLock Class Reference

A helper to lock object on upgradable mode. More...

#include <ObjectReadToWriteLock.hpp>

Public Member Functions

FWDATA_API ObjectReadToWriteLock (::fwData::Object::sptr obj, bool lock=true)
 Constructor : owns an upgradable lock on object mutex. If adopt_lock==false : the mutex is not locked (call lock() to lock mutex)
 
FWDATA_API ~ObjectReadToWriteLock ()
 Destructor. Does nothing.
 
FWDATA_API void lock ()
 Adds upgradable lock on object mutex.
 
FWDATA_API void unlock ()
 Releases upgradable lock on object mutex.
 
FWDATA_API void upgrade ()
 Upgrade lock to exclusive.
 
FWDATA_API void downgrade ()
 Downgrade exclusive lock to upgradable lock.
 

Detailed Description

A helper to lock object on upgradable mode.

Definition at line 23 of file ObjectReadToWriteLock.hpp.


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