Page Speed Optimization Libraries
1.13.35.1
|
Implementation of RWLock for Pthread mutexes. More...
#include "pthread_rw_lock.h"
Public Member Functions | |
virtual bool | TryLock () |
Attempt to take mutex, true on success, false if held by another thread. | |
virtual void | Lock () |
Block until mutex is available, then take the mutex. | |
virtual void | Unlock () |
Release the mutex, permitting a blocked lock operation (if any) to proceed. | |
virtual bool | ReaderTryLock () |
virtual void | ReaderLock () |
Block until this Mutex is free, or shared, then acquire a share of it. | |
virtual void | ReaderUnlock () |
Release a read share of this Mutex. | |
Public Member Functions inherited from net_instaweb::ThreadSystem::RWLock | |
virtual void | DCheckReaderLocked () |
Public Member Functions inherited from net_instaweb::AbstractMutex | |
virtual void | DCheckLocked () |
virtual void | DCheckUnlocked () |
Implementation of RWLock for Pthread mutexes.
|
virtual |
ReaderLock/Unlock are different from normal locks. Reader locks are shared while normal locks are exclusive. Normal lock cannot happen when reader has a lock. Try to acquire a read share of this lock without blocking.
Implements net_instaweb::ThreadSystem::RWLock.