Skip to content

Pylon::WaitObjects#

A set of wait objects.

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

function WaitObjects#

WaitObjects()

Creates an empty wait object set.

function ~WaitObjects#

~WaitObjects()

destructor

function WaitObjects#

WaitObjects(
    const WaitObjects & 
)

copy constructor

function operator=#

WaitObjects & operator=(
    const WaitObjects & 
)

assignment operator

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

function RemoveAll#

void RemoveAll(
    void 
)

Removes all added wait objects.

Calling RemoveAll from another thread during wait operations will cause undefined behaviour.

function 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

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

function 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

function 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