RTI Connext C# API
7.1.0
|
Allows an application to wait until one or more of the attached Condition objects have a trigger value of true or else until the timeout expires. More...
Inherits IDisposable.
Public Member Functions | |
WaitSet () | |
Creates a new WaitSet More... | |
WaitSet (WaitSetProperty property) | |
Creates a new WaitSet with a non-default configuration. More... | |
void | AttachCondition (Condition condition) |
Attaches a Condition to the WaitSet. More... | |
bool | DetachCondition (Condition condition) |
Detaches a Condition from the WaitSet. More... | |
int | Dispatch (Duration maxWait) |
Waits for at least one of the attached conditions to trigger and then calls the event handler for each of the active conditions. More... | |
int | Dispatch () |
Waits an unlimited amount of time for at least one of the attached conditions to trigger and then calls the event handlers of the active conditions. More... | |
IEnumerable< Condition > | Wait (Duration maxWait) |
Allows an application thread to wait for the occurrence of certain conditions. More... | |
IEnumerable< Condition > | Wait () |
Allows an application thread to wait for the occurrence of certain conditions. It waits an infinite amount of time. More... | |
void | Dispose () |
Releases the native resources used by this WaitSet. A finalizer is also provided, so it is not necessary to call Dispose. More... | |
Properties | |
IEnumerable< Condition > | Conditions [get] |
Retrieves the list of attached Conditions. More... | |
Allows an application to wait until one or more of the attached Condition objects have a trigger value of true or else until the timeout expires.
WaitSet | ( | WaitSetProperty | property | ) |
void AttachCondition | ( | Condition | condition | ) |
bool DetachCondition | ( | Condition | condition | ) |
int Dispatch | ( | ) |
Waits an unlimited amount of time for at least one of the attached conditions to trigger and then calls the event handlers of the active conditions.
int Dispatch | ( | Duration | maxWait | ) |
Waits for at least one of the attached conditions to trigger and then calls the event handler for each of the active conditions.
This is an alternative pattern to the use of Wait(). Instead of receiving the list of active conditions, the application associates an event handler to each condition before attaching it to the WaitSet. When this method wakes up after one or more conditions have become active, it calls their Condition.Triggered event handlers before returning. The handlers are called by Dispatch() in the context of the current thread.
maxWait | The maximum time to wait. If that time elapses this method returns normally without calling any of the condition handlers. |
void Dispose | ( | ) |
Releases the native resources used by this WaitSet. A finalizer is also provided, so it is not necessary to call Dispose.
IEnumerable<Condition> Wait | ( | ) |
Allows an application thread to wait for the occurrence of certain conditions. It waits an infinite amount of time.
The full documentation is available in the C API: DDS_WaitSet_wait
Allows an application thread to wait for the occurrence of certain conditions.
The full documentation is available in the C API: DDS_WaitSet_wait