Task Cancellation
Created by: saniul
I was wondering, what is the intended approach to task cancellation?
BFTask
only exposes methods for task consumption and continuation, while the cancellation is implemented through BFTaskCompletionSource
(which actually just calls internal cancellation methods of BFTask
).
There is no way to cancel a BFTask
without having a reference to its completion source.
Does this mean that a task producer should keep a reference to all its long-running cancellable task completion sources and expose an interface for identifying and cancelling a specific task?