libcommonc++  0.7
ScopedReadWriteLock.h++ File Reference
Include dependency graph for ScopedReadWriteLock.h++:

Go to the source code of this file.

Classes

class  ScopedReadLock
 A convenience object for lexical scope based synchronization. More...
 
class  ScopedWriteLock
 A convenience object for lexical scope based synchronization. More...
 

Namespaces

 ccxx
 

Macros

#define synchronized_read(LOCK)
 Introduce a code block that is read-locked by the ReadWriteLock LOCK. More...
 
#define synchronized_write(LOCK)
 Introduce a code block that is write-locked by the ReadWriteLock LOCK. More...
 

Macro Definition Documentation

◆ synchronized_read

#define synchronized_read (   LOCK)
Value:
for(commoncpp::ScopedReadLock \
CCXX_OS_UNIQUE_VARNAME(LOCK, __LINE__, locker)(LOCK); \
CCXX_OS_UNIQUE_VARNAME(LOCK, __LINE__, locker).testOnce();)

Introduce a code block that is read-locked by the ReadWriteLock LOCK.

◆ synchronized_write

#define synchronized_write (   LOCK)
Value:
for(commoncpp::ScopedWriteLock \
CCXX_OS_UNIQUE_VARNAME(LOCK, __LINE__, locker)(LOCK); \
CCXX_OS_UNIQUE_VARNAME(LOCK, __LINE__, locker).testOnce();)

Introduce a code block that is write-locked by the ReadWriteLock LOCK.