JoinableTask.JoinAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Shares any access to the main thread the caller may have Joins any main thread affinity of the caller with the asynchronous operation to avoid deadlocks in the event that the main thread ultimately synchronously blocks waiting for the operation to complete.
public System.Threading.Tasks.Task JoinAsync (System.Threading.CancellationToken cancellationToken = default);
member this.JoinAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function JoinAsync (Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- cancellationToken
- CancellationToken
A cancellation token that will revert the Join and cause the returned task to complete before the async operation has completed.
Returns
A task that completes after the asynchronous operation completes and the join is reverted.