class ThreadLock

Posix rwlock extension for protected access. More...

Definition#include <thread.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


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.

ThreadLock ()

Create a process shared thread lock object.

~ThreadLock ()

Destroy a process shared thread lock object.

void ReadLock (void)

Aquire a read lock for the current object.

void WriteLock (void)

Aquire a write lock for the current object.

bool TryReadLock (void)

Attempt read lock for current object.

Returns: true on success.

bool TryWriteLock (void)

Attempt write lock for current object.

Returns: true on success.

void Unlock (void)

Release any held locks.