Table of Contents
WaitableTask.WaitAny Method (WaitableTask[], Int32)

Wait for any of the specified tasks to complete.

Syntax
 public static int WaitAny(
   WaitableTask[] tasks,
   int timeout
);

Parameters

tasks
All taskes to be waited for.
timeout
Timeout value in milliseconds, or -1 if to wait forever.
Remarks

If any of the tasks has completed before timeout expires, this function returns the index of that task. If no task has completed before timeout expires, this function returns WaitHandle.WaitTimeout.

See Also