nn::os::SafeBlockingQueue Class

Header file: nn/os.h

Syntax

class SafeBlockingQueue : private nn::os::detail::BlockingQueueBase

Description

Class for handling blocking queues.

This class is essentially the same as BlockingQueue, but with this class, priority inversion will never occur because it uses the Mutex class for thread synchronization. As a consequence, its performance might drop slightly.

Member Functions

SafeBlockingQueue Constructor.
~SafeBlockingQueue Destructor.
Initialize Initializes a blocking queue using the specified buffer and size.
TryInitialize Initializes a blocking queue using the specified buffer and size.
Finalize Destroys a blocking queue.
Enqueue Inserts an element at the end of the queue.
TryEnqueue Tries to insert an element at the end of the queue.
Jam Inserts an element at the front of the queue.
TryJam Tries to insert an element at the front of the queue.
Dequeue Removes the first element from the front of the queue.
TryDequeue Removes the first element from the front of the queue.
GetFront Gets the element at the front of the queue.
TryGetFront Gets the element at the front of the queue.

Class Hierarchy

ADLFireWall::NonCopyable
  nn::os::detail::BlockingQueueBase
    nn::os::SafeBlockingQueue

Revision History

2010/01/07
Initial version.

CONFIDENTIAL