Waits for any of the provided cancellable System.Threading.Tasks.Task objects to complete execution within a specified number of milliseconds.
- tasks
An array of System.Threading.Tasks.Task instances on which to wait.
- millisecondsTimeout
The number of milliseconds to wait, or System.Threading.Timeout.Infinite (-1) to wait indefinitely.
- cancellationToken
A TaskFactory.CancellationToken to observe while waiting for a task to complete.
![]()
The index of the completed task in the tasks array argument, or -1 if the timeout occurred.