Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

2.7 Synchronization Package

2.7.1 Description

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.

2.7.2 Synchronization Class Hierarchy

Figure 10: Synchronization class hierarchy

2.7.3 The Guard Class Hierarchy

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).

Figure 11: Guard class hierarchy

2.7.4 Index of Synchronization Classes

Table 7 contains an alphabetical listing of the public classes and global functions in the Synchronization package.

Table 7: Index of Synchronization classes 

Class Name Description

RWBarrier

Synchronizes a specified number of threads at a common synchronization point.

RWCancellationState

Used with the Synchronization objects to set the cancellation policy.

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 Module 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.



Previous fileTop of DocumentContentsIndex pageNext file

© 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.