The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not.
More...
#include <thread.h>
Inheritance diagram for ThreadLock:
Collaboration diagram for ThreadLock:
Public Member Functions
Create a process shared thread lock object.
More...
Destroy a process shared thread lock object.
More...
Aquire a read lock for the current object.
More...
Aquire a write lock for the current object.
More...
Attempt read lock for current object.
More...
Attempt write lock for current object.
More...
Private Attributes
Detailed Description
The ThreadLock class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not.
- Author
- David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m Posix rwlock extension for protected access.
Definition at line 357 of file thread.h.
Constructor & Destructor Documentation
ThreadLock::ThreadLock
(
)
Create a process shared thread lock object.
virtual ThreadLock::~ThreadLock
(
)
virtual
Destroy a process shared thread lock object.
Member Function Documentation
void ThreadLock::readLock
(
void
)
Aquire a read lock for the current object.
bool ThreadLock::tryReadLock
(
void
)
Attempt read lock for current object.
- Returns
- true on success.
bool ThreadLock::tryWriteLock
(
void
)
Attempt write lock for current object.
- Returns
- true on success.
void ThreadLock::unlock
(
void
)
void ThreadLock::writeLock
(
void
)
Aquire a write lock for the current object.
Field Documentation
The documentation for this class was generated from the following file: