TibrvQueueGroup::timedDispatch()
Method
Declaration
virtual TibrvStatus timedDispatch
(tibrv_f64 timeout);
Purpose
Dispatch an event, but if no event is ready to dispatch, limit the time that this call blocks while waiting for an event.
Remarks
If any queue in the group contains an event, then this call searches the queues in priority order, dispatches an event from the first non-empty queue that it finds, and then returns. If the queue is empty, this call waits for an event to arrive in any queue. If an event arrives before the waiting time elapses, then the call searches the queues, dispatches the event, and returns. If the waiting time elapses first, then the call returns without dispatching an event.
When searching the group for a non-empty queue, this call searches according to the priority values of the queues. If two or more queues have identical priorities, subsequent dispatch calls rotate through them in round-robin fashion.
When the call dispatches an event, it returns the status code TIBRV_OK. When the call does not dispatch an event, it returns the status code TIBRV_TIMEOUT.
Parameter |
Description |
|
Maximum time (in seconds) that this call can block while waiting for an event to arrive in the queue group.
|