The Synchronization packages includes a group of synchronization classes (shown in Figure 10) and a group of helper classes, called guard classes (shown in Figure 11). For complete information about the Synchronization package see Chapter 4 in the Threads.h++ User's Guide.
To simplify the acquisition and release of synchronization resources and to make these operations safe in the presence of exceptions, the Synchronization package has a set of helper classes called guards (see Figure 11).
Table 8 contains an alphabetical listing of the public classes and global functions in the Synchronization package.
Class Name | Description |
RWBarrier |
Synchronizes a specified number of threads at a common synchronization point. |
RWCondition |
Condition variable synchronization mechanism. |
RWCriticalSection |
Protects a section of code by ensuring execution by only one thread at a time. |
RWFIFOMutexLock |
A mutex that guarantees a first-in-first-out (FIFO) acquisition order, regardless of thread priority. |
RWMutexLock |
A simple, blocking mutual-exclusion lock, or mutex. |
RWNullMutexLock |
Non-blocking mutex, useful for code that may or may not be used in a multithreaded situation. |
RWReadersWriterLock |
A readers-writer mutex lock that favors writers over readers. |
RWSemaphore |
A class that implements Dijkstra's classic counting semaphore. |
RWSynchObject |
Base class for the Threads.h++ synchronization classes. |
RWTGuardBase<Resource> |
Base class for classes that implement locking or unlocking guard semantics. |
rwThreadHash() |
Global function that converts an RWThreadId instance into a unique hash value. |
RWThreadId |
A wrapper for platform-specific thread IDs. |
rwThreadId() |
Global function that returns an RWThreadId instance that can be used to identify the calling thread. |
RWTLockGuard<Resource> |
Guard class that provides automatic acquire and release functionality. |
RWTLockGuardBase<Resource> |
Base class for guard classes that first acquire and then release the resource. |
RWTMonitor<Mutex> |
Base class for classes that require monitor-style synchronization semantics. |
RWTReadGuardBase<Resource> |
Base class for classes that implement guard semantics for controlling read access to a resource. |
RWTReadLockGuard<Resource> |
Guard class providing automatic acquireRead and release functionality. |
RWTReadLockGuardBase<Resource> |
Base class for guard classes that first acquire for reading and then release the resource. |
RWTReadUnlockGuard<Resource> |
Guard class providing automatic release and acquireRead functionality. |
RWTRecursiveLock<Lock> |
Adds recursive acquisition semantics to a mutual exclusion lock class. |
RWTTryLockGuard<Resource> |
Guard class providing automatic tryAcquire and release functionality. |
RWTTryReadLockGuard<Resource> |
Guard class providing automatic tryAcquireRead and release functionality. |
RWTTryWriteLockGuard<Resource> |
Guard class providing automatic tryAcquireWrite and release functionality. |
RWTUnlockGuard<Resource> |
Guard class providing automatic release and acquire functionality. |
RWTWriteGuardBase<Resource> |
Base class for classes that implement guard semantics for controlling write access to a resource. |
RWTWriteLockGuard<Resource> |
Guard class providing automatic acquireWrite and release functionality. |
RWTWriteLockGuardBase<Resource> |
Base class for guard classes that first acquire for writing and then release the resource. |
RWTWriteUnlockGuard<Resource> |
Guard class providing automatic release and acquireWrite functionality. |
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.