TaskWhenAny
Task.WhenAny is a static method in the .NET framework (System.Threading.Tasks) that implements a race among multiple tasks. It returns a task that completes as soon as any one of the supplied tasks completes. The result is the completed task itself, not its value.
Overloads and return types include non-generic and generic forms. For non-generic tasks, the method returns Task<Task>,
Behavior and semantics: WhenAny completes, it does not guarantee that the first completed task is successful;
Usage patterns include racing multiple asynchronous operations to proceed with the quickest result, implementing timeouts, or
See also: Task.WhenAll, cancellation and timeouts in asynchronous programming, and patterns for coordinating multiple tasks in