Converts this task to an instance of Deferred. If task is cancelled then resulting deferred will be cancelled as well. However, the opposite is not true: if the deferred is cancelled, the Task will not be cancelled. For bi-directional cancellation, an overload that accepts CancellationTokenSource can be used.
If the given task is cancelled, the resulting deferred will be cancelled.
If the resulting deferred is cancelled, the provided cancellationTokenSource will be cancelled.