Queue.TimedDispatch

Method

Visual Basic

NotOverrideable Public Function TimedDispatch (
    ByVal timeout As Double )
  As Boolean
  Implements IDispatchable.TimedDispatch

C#

public bool TimedDispatch (
    double 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 an event is already in the queue, this call dispatches it, and returns immediately. If the queue is empty, this call waits for an event to arrive. If an event arrives before the waiting time elapses, then it dispatches the event and returns. If the waiting time elapses first, then the call returns without dispatching an event.

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

Parameter

Description

timeout

Maximum time (in seconds) that this call can block while waiting for an event to arrive in the queue.

TimeoutValue.NoWait indicates no blocking (immediate timeout).

TimeoutValue.WaitForever indicates no timeout.

See Also

IDispatchable

IDispatchable.TimedDispatch

Queue.Dispatch

Queue.Poll