Pylon::WaitObjects#
#include <pylon/WaitObjects.h>
Public Functions#
Name | |
---|---|
WaitObjects() Creates an empty wait object set. | |
~WaitObjects() destructor | |
WaitObjects(const WaitObjects & ) copy constructor | |
WaitObjects & | operator=(const WaitObjects & ) assignment operator |
unsigned | Add(const WaitObject & o) Add an object to wait on and return the index of the added object. |
void | RemoveAll(void ) Removes all added wait objects. |
bool | WaitForAll(unsigned timeout) const Wait for all objects to get signaled. |
bool | WaitForAny(unsigned timeout, unsigned * pIndex =NULL) const Wait for any one object to get signaled. |
EWaitExResult | WaitForAllEx(unsigned timeout, bool bAlertable) const Wait for all objects to get signaled. |
EWaitExResult | WaitForAnyEx(unsigned timeout, bool bAlertable, unsigned * pIndex =NULL) const Wait for any one object to get signaled. |
Public Functions Documentation#
WaitObjects#
WaitObjects()
Creates an empty wait object set.
~WaitObjects#
~WaitObjects()
destructor
WaitObjects#
WaitObjects(
const WaitObjects &
)
copy constructor
operator=#
WaitObjects & operator=(
const WaitObjects &
)
assignment operator
Add#
unsigned Add(
const WaitObject & o
)
Add an object to wait on and return the index of the added object.
Calling Add from another thread during wait operations will cause undefined behaviour.
RemoveAll#
void RemoveAll(
void
)
Removes all added wait objects.
Calling RemoveAll from another thread during wait operations will cause undefined behaviour.
WaitForAll#
bool WaitForAll(
unsigned timeout
) const
Wait for all objects to get signaled.
Parameters:
- timeout maximum wait period in milliseconds
Return: true if all objects were signaled
WaitForAny#
bool WaitForAny(
unsigned timeout,
unsigned * pIndex =NULL
) const
Wait for any one object to get signaled.
Parameters:
- timeout maximum wait period in milliseconds
- *pIndex (optional) pointer to buffer taking the index of the signaled object
Return: true if any object was signaled.
WaitForAllEx#
EWaitExResult WaitForAllEx(
unsigned timeout,
bool bAlertable
) const
Wait for all objects to get signaled.
Parameters:
- bAlertable If true, the wait operation can be interrupted (Windows: APC; UNIX: signal)
- timeout maximum wait period in milliseconds
WaitForAnyEx#
EWaitExResult WaitForAnyEx(
unsigned timeout,
bool bAlertable,
unsigned * pIndex =NULL
) const
Wait for any one object to get signaled.
Parameters:
- timeout maximum wait period in milliseconds
- bAlertable If true, the wait operation can be interrupted (Windows: APC; UNIX: signal)
- *pIndex (optional) pointer to buffer taking the index of the signaled object
Updated on 5 July 2022 at 15:30:00