TibrvQueueGroup.poll()

Method

Declaration

boolean poll()
  throws TibrvException, java.lang.InterruptedException

Purpose

Dispatch an event, but if no event is ready to dispatch, return immediately (without blocking).

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 all the queues are empty, then this call returns immediately.

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 and poll calls rotate through them in round-robin fashion.

When the call dispatches an event, it returns true. When the call does not dispatch an event, it returns false.

This call is equivalent to timedDispatch(0).

See Also

Interrupting Event Dispatch Threads

TibrvDispatchable

TibrvDispatchable.poll()

TibrvQueueGroup.dispatch()

TibrvQueueGroup.timedDispatch()