UCommon
|
Condition classes for thread sychronization and timing. More...
Go to the source code of this file.
Data Structures | |
class | ucommon::Barrier |
A portable implementation of "barrier" thread sychronization. More... | |
class | ucommon::Conditional |
The conditional is a common base for other thread synchronizing classes. More... | |
class | ucommon::ConditionalAccess |
The conditional rw seperates scheduling for optizming behavior or rw locks. More... | |
class | ucommon::ConditionalLock |
An optimized and convertable shared lock. More... | |
class | ucommon::ConditionMutex |
Condition Mutex to pair with conditionals. More... | |
class | ucommon::ConditionVar |
The condition Var allows multiple conditions to share a mutex. More... | |
class | ucommon::Semaphore |
A portable counting semaphore class. More... | |
Namespaces | |
namespace | ucommon |
Common namespace for all ucommon objects. | |
Typedefs | |
typedef ConditionalAccess | ucommon::accesslock_t |
Convenience type for scheduling access. | |
typedef Barrier | ucommon::barrier_t |
Convenience type for using thread barriers. | |
typedef ConditionalLock | ucommon::condlock_t |
Convenience type for using conditional locks. | |
typedef Semaphore | ucommon::semaphore_t |
Convenience type for using counting semaphores. | |
Condition classes for thread sychronization and timing.
The theory behind ucommon sychronization objects is that all upper level sychronization objects can be formed directly from a mutex and conditional. This includes semaphores, barriers, rwlock, our own specialized conditional lock, resource-bound locking, and recursive exclusive locks. Using only conditionals means we are not dependent on platform specific pthread implementations that may not implement some of these, and hence improves portability and consistency. Given that our rwlocks are recursive access locks, one can safely create read/write threading pairs where the read threads need not worry about deadlocks and the writers need not either if they only write-lock one instance at a time to change state.
Definition in file condition.h.