How can I cancel Task.WhenAll?
Use TaskCompletionSource<T> to create a task for some asynchronous condition that does not already have an asynchronous API. Use CancellationToken.Register to hook the modern CancellationToken-based cancellation system into another cancellation system. Your solution just needs to combine these two. I have a CancellationToken.AsTask() extension method in my AsyncEx library, but you can write your own … Read more