Public Member Functions
|Standard constructor. |
|Standard destructor. |
|HazardPtr *||allocateHazardPtr (void)|
|Allocates a HazardPtr for the queue instance to be used by the calling thread. |
|void||retireHazardPtr (HazardPtr *ptr)|
|Marks the given HazardPtr to be available for reuse by other threads. |
|void||push (HazardPtr *ptr, const T &value)|
|Inserts the given value at the back of the queue in a thread-safe manner. |
|bool||pop (HazardPtr *ptr, T &destination)|
|Pops an entry from the queue in a thread-safe manner. |
|HazardPtr provides a safe mechanism for threads to advertise to all other threads making use of the same data structure about their memory usage. More...|
The implementation is lock-free if the atomic primitive compare-and-swap is lock-free.
Allocates a HazardPtr for the queue instance to be used by the calling thread.
All allocated HazardPtrs must be retired if the thread wishes to no longer use the queue.
|void OgreHaptics::ConcurrentQueue< T >::push||(||HazardPtr *||ptr,|
|const T &||value|
|bool OgreHaptics::ConcurrentQueue< T >::pop||(||HazardPtr *||ptr,|
Pops an entry from the queue in a thread-safe manner.
|ptr||Pointer to the hazard pointer owned by the thread in which the operation is called.|
|destination||Reference to the variable to which the entry will be assigned when popping was successful.|
trueif the destination value has been set successfully (e.g. the queue was not empty),
Last modified Tue Jan 6 22:31:25 2009