Creates a new Task for the target Dispatcher (default: the main Dispatcher) based upon the given action. This method will wait for the task completion or the timeout.

Namespace: UnityThreading
Assembly: UnityThreading (in UnityThreading.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void DispatchAndWait(
	Action action,
	float timeOutSeconds
)
Visual Basic
Public Sub DispatchAndWait ( _
	action As Action, _
	timeOutSeconds As Single _
)
Visual C++
public:
void DispatchAndWait(
	Action^ action, 
	float timeOutSeconds
)

Parameters

action
Type: System..::..Action
The action to process at the dispatchers thread.
timeOutSeconds
Type: System..::..Single
Time in seconds after the waiting process will stop.

See Also