CoreDX DDS Java Reference Manual
Public Member Functions | List of all members

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...

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 ( )

Constructor.

Member Function Documentation

ReturnCode_t attach_condition ( Condition  c)

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 ( )

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)

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)

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

ReturnCode_t wait ( Vector  active_conditions,
Duration_t  timeout 
)

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.


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