Make sure to cancel tasks with the associated token
When we were cancelling tasks returned from GetValueAsync, we were not passing along the CancellationToken because TaskCompletionSource doesn't allow us to pass that in .NET 4.5. The appropriate method was added in .NET 4.6 but we haven't moved to it yet. In the mean time we'll just use AsyncTaskMethodBuilder which does provide the necessary functionality. Fixes GitHub issue #447.
Showing
想要评论请 注册 或 登录