TryJam

nn::os::BlockingQueue::TryJam Member Function

Syntax

#include <nn/os.h>

bool TryJam(
     uptr data
);

Parameters

Name Description
in data Element to insert

Return Values

Returns true if the element was inserted, and false otherwise.

Description

Tries to insert an element at the front of the queue.

If the queue isn't full, inserts an element at the front of the queue and returns true. If the queue is full, 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