#include "null_rw_lock.h"
Public Member Functions | |
virtual void | Lock () |
virtual void | Unlock () |
virtual void | ReaderLock () |
virtual void | ReaderUnlock () |
Release a read share of this Mutex. | |
virtual void | DCheckReaderLocked () |
Implements an empty mutex for single-threaded programs that need to work with interfaces that require mutexes.
virtual void net_instaweb::NullRWLock::DCheckReaderLocked | ( | ) | [virtual] |
Optionally checks that reader lock is held (for invariant checking purposes). Default implementation does no checking.
Reimplemented from net_instaweb::ThreadSystem::RWLock.
virtual void net_instaweb::NullRWLock::ReaderLock | ( | ) | [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. Block until this Mutex is free, or shared, then acquire a share of it.
Implements net_instaweb::ThreadSystem::RWLock.