.TH "SbRWMutex" 3 "Wed May 23 2012" "Version 3.1.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbRWMutex \- .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "enum \fBPrecedence\fP { \fBREAD_PRECEDENCE\fP, \fBWRITE_PRECEDENCE\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbRWMutex\fP (Precedence policy)" .br .ti -1c .RI "\fB~SbRWMutex\fP (void)" .br .ti -1c .RI "int \fBwriteLock\fP (void)" .br .ti -1c .RI "SbBool \fBtryWriteLock\fP (void)" .br .ti -1c .RI "int \fBwriteUnlock\fP (void)" .br .ti -1c .RI "int \fBreadLock\fP (void)" .br .ti -1c .RI "int \fBtryReadLock\fP (void)" .br .ti -1c .RI "int \fBreadUnlock\fP (void)" .br .in -1c .SH "Detailed Description" .PP The \fBSbRWMutex\fP is a mutex that is used to grant both read and write access to the data it protects\&. Multiple threads can have read locks on the data at once, but only one write-lock can be given out and not while a thread has a read lock on the data\&. .PP The policy on granting read locks to threads when a thread is waiting for the write lock is something that should be configurable at construction time but which isn't at the moment\&. .SH "Constructor & Destructor Documentation" .PP .SS "SbRWMutex::SbRWMutex (Precedencepolicy)\fC [inline]\fP" Constructor\&. .SS "SbRWMutex::~SbRWMutex (void)\fC [inline]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "int SbRWMutex::writeLock (void)\fC [inline]\fP" This method blocks the calling thread until it gains write lock status on the \fBSbRWMutex\fP object\&. .SS "SbBool SbRWMutex::tryWriteLock (void)\fC [inline]\fP" This method tries to gain write lock status on the \fBSbRWMutex\fP\&. TRUE is returned if it was successful, FALSE otherwise\&. This is a non-blocking operation\&. .SS "int SbRWMutex::writeUnlock (void)\fC [inline]\fP" This method is used for unlocking the calling thread's write lock\&. .SS "int SbRWMutex::readLock (void)\fC [inline]\fP" This method blocks the calling thread until it gains read lock status on the \fBSbRWMutex\fP object\&. .SS "SbBool SbRWMutex::tryReadLock (void)\fC [inline]\fP" This method tries to gain read lock status on the \fBSbRWMutex\fP\&. TRUE is returned if it was successful, FALSE otherwise\&. This is a non-blocking operation\&. .SS "int SbRWMutex::readUnlock (void)\fC [inline]\fP" This method is used for unlocking the calling thread's read lock\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.