This project is read-only.
1
Vote

AbstractSimplificationService.ReduceAsync calls Task.WaitAll

description

Async methods should not unnecessarily block threads (UI thread or otherwise). This method delegates to a synchronous Reduce method which calls Task.WaitAll.

It appears Task.WaitAll takes a CancellationToken whereas Task.WhenAll does not offer that option. I see Roslyn is passing in a CancellationToken so that may be why WaitAll was chosen. However there are better ways to combine cancellation and async code.

I'll prepare a pull request for this fix.

comments

AArnott wrote Dec 29, 2014 at 5:55 PM

AArnott wrote Feb 13, 2015 at 5:16 AM