You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a highly undesirable default behavior. It is not obvious this will hang and there is no easy way to detect that this was the cause.
Other information
I recommend one of the following adjustments:
If using Task.WhenAny() on an empty list/enumerable/array:
A) Throw a Sequence contains no elements exception.
OR
B) Immediately return Task.CompletedTask or Task.FromResult(default(T))
I am OK with either, but I think that A is the best option.