#include <Lockable.h>
Inheritance diagram for ZThread::Lockable:
Public Member Functions | |
virtual | ~Lockable () |
Destroy a Lockable object. | |
virtual void | acquire ()=0 |
virtual bool | tryAcquire (unsigned long timeout)=0 |
virtual void | release ()=0 |
virtual void ZThread::Lockable::acquire | ( | ) | [pure virtual] |
Acquire the Lockable object.
This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Interrupted_Exception | thrown if the calling thread is interrupted before the operation completes. |
Implemented in ZThread::BlockingQueue< T, LockType, StorageType >, ZThread::BoundedQueue< T, LockType, StorageType >, ZThread::ClassLockable< ClassType, LockType >, ZThread::CountingSemaphore, ZThread::FastMutex, ZThread::FastRecursiveMutex, ZThread::MonitoredQueue< T, LockType, StorageType >, ZThread::Mutex, ZThread::PriorityInheritanceMutex, ZThread::PriorityMutex, ZThread::PrioritySemaphore, ZThread::RecursiveMutex, and ZThread::Semaphore.
virtual void ZThread::Lockable::release | ( | ) | [pure virtual] |
Release the Lockable object.
This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Implemented in ZThread::BlockingQueue< T, LockType, StorageType >, ZThread::BoundedQueue< T, LockType, StorageType >, ZThread::ClassLockable< ClassType, LockType >, ZThread::CountingSemaphore, ZThread::FastMutex, ZThread::FastRecursiveMutex, ZThread::MonitoredQueue< T, LockType, StorageType >, ZThread::Mutex, ZThread::PriorityInheritanceMutex, ZThread::PriorityMutex, ZThread::PrioritySemaphore, ZThread::RecursiveMutex, and ZThread::Semaphore.
virtual bool ZThread::Lockable::tryAcquire | ( | unsigned long | timeout | ) | [pure virtual] |
Attempt to acquire the Lockable object.
This method may or may not block the caller for a definite amount of time. Those details are defined by specializations of this class; however, this method includes a timeout value that can be used to limit the maximum amount of time that a specialization could block.
timeout | - maximum amount of time (milliseconds) this method could block |
Interrupted_Exception | thrown if the calling thread is interrupted before the operation completes. |
Implemented in ZThread::BlockingQueue< T, LockType, StorageType >, ZThread::BoundedQueue< T, LockType, StorageType >, ZThread::ClassLockable< ClassType, LockType >, ZThread::CountingSemaphore, ZThread::FastMutex, ZThread::FastRecursiveMutex, ZThread::MonitoredQueue< T, LockType, StorageType >, ZThread::Mutex, ZThread::PriorityInheritanceMutex, ZThread::PriorityMutex, ZThread::PrioritySemaphore, ZThread::RecursiveMutex, and ZThread::Semaphore.