CoreDX DDS
Java Reference Manual

WaitSet Class Reference
[DDS WaitSets]

A DDS_WaitSet maintains a set of Condition objects and allows the application to wait until one or more of them have a trigger_value of TRUE. More...

List of all members.

Public Member Functions

 WaitSet ()
void destroy ()
ReturnCode_t attach_condition (Condition c)
ReturnCode_t detach_condition (Condition c)
ReturnCode_t wait (Vector active_conditions, Duration_t timeout)
ReturnCode_t get_conditions (Vector attached_conditions)

Detailed Description

A DDS_WaitSet maintains a set of Condition objects and allows the application to wait until one or more of them have a trigger_value of TRUE.

Multiple conditions may be attached to a WaitSet.

See also:
Condition

Constructor & Destructor Documentation

WaitSet (  )  [inline]

Constructor.


Member Function Documentation

ReturnCode_t attach_condition ( Condition  c  )  [inline]

Adds the condition c to the WaitSet. If another thread is currently 'waiting' on the WaitSet, this newly added condition will unblock that thread if its trigger_value is TRUE.

void destroy (  )  [inline]

Destructor. Releases internal resources associated with the WaitSet. This WaitSet is destroyed, and must not be used after this call returns.

ReturnCode_t detach_condition ( Condition  c  )  [inline]

Adds the condition c to the WaitSet. If another thread is currently 'waiting' on the WaitSet, this newly added condition will unblock that thread if its trigger_value is TRUE.

ReturnCode_t get_conditions ( Vector  attached_conditions  )  [inline]

Retrieves the current list of attached conditions. Populates the attached_conditions sequence.

ReturnCode_t wait ( Vector  active_conditions,
Duration_t  timeout 
) [inline]

Causes the controlling thread to block until an attached condition is triggered or timeout elapses.

A return value of DDS_RETCODE_OK indicates that one or more of the attached conditions evaluated to TRUE. Those 'active' conditions are included in the 'out' parameter active_conditions.

A return value of DDS_RETCODE_TIMEOUT indicates that the timeout period elapsed without any of the conditions evaluating to TRUE.

 All Classes Functions Variables

© 2009-2012 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.