JoinableTask<T>.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.
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<T> JoinAsync (System.Threading.CancellationToken cancellationToken = default);
override this.JoinAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public Function JoinAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Parameters
- cancellationToken
- CancellationToken
A cancellation token that will exit this method before the task is completed.
Returns
Task<T>
A task that completes after the asynchronous operation completes and the join is reverted, with the result of the operation.