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 Module 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 7 contains an alphabetical listing of the public classes and global functions in the Synchronization package.
Class Name | Description |
Synchronizes a specified number of threads at a common synchronization point. | |
Used with the Synchronization objects to set the cancellation policy. | |
Condition variable synchronization mechanism. | |
Protects a section of code by ensuring execution by only one thread at a time. | |
A mutex that guarantees a first-in-first-out (FIFO) acquisition order, regardless of thread priority. | |
A simple, blocking mutual-exclusion lock, or mutex. | |
Non-blocking mutex, useful for code that may or may not be used in a multithreaded situation. | |
A readers-writer mutex lock that favors writers over readers. | |
A class that implements Dijkstra's classic counting semaphore. | |
Base class for the Threads Module synchronization classes. | |
Base class for classes that implement locking or unlocking guard semantics. | |
Global function that converts an RWThreadId instance into a unique hash value. | |
A wrapper for platform-specific thread IDs. | |
Global function that returns an RWThreadId instance that can be used to identify the calling thread. | |
Guard class that provides automatic acquire and release functionality. | |
Base class for guard classes that first acquire and then release the resource. | |
Base class for classes that require monitor-style synchronization semantics. | |
Base class for classes that implement guard semantics for controlling read access to a resource. | |
Guard class providing automatic acquireRead and release functionality. | |
Base class for guard classes that first acquire for reading and then release the resource. | |
Guard class providing automatic release and acquireRead functionality. | |
Adds recursive acquisition semantics to a mutual exclusion lock class. | |
Guard class providing automatic tryAcquire and release functionality. | |
Guard class providing automatic tryAcquireRead and release functionality. | |
Guard class providing automatic tryAcquireWrite and release functionality. | |
Guard class providing automatic release and acquire functionality. | |
Base class for classes that implement guard semantics for controlling write access to a resource. | |
Guard class providing automatic acquireWrite and release functionality. | |
Base class for guard classes that first acquire for writing and then release the resource. | |
Guard class providing automatic release and acquireWrite functionality. |
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.