TryDequeue

nn::os::BlockingQueue::TryDequeue Member Function

Syntax

#include <nn/os.h>

bool TryDequeue(
     uptr * pOut
);

Parameters

Name Description
out pOut Buffer in which to write the retrieved element

Return Values

Returns true if an element was retrieved, and false if no element was retrieved.

Description

Removes the first element from the front of the queue.

If the queue is not empty, retrieves the element at the front of the queue and returns true. If the queue is empty, does nothing and returns false.

If there are any threads being blocked by Dequeue or GetFront when the element is inserted, these threads are started.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL