JoinableTask<T>.Join(CancellationToken) Method

Definition

Synchronously blocks the calling thread until the operation has completed. If the calling thread is the Main thread, deadlocks are mitigated.

public T Join (System.Threading.CancellationToken cancellationToken = default);
override this.Join : System.Threading.CancellationToken -> 'T
Public Function Join (Optional cancellationToken As CancellationToken = Nothing) As T

Parameters

cancellationToken
CancellationToken

A cancellation token that will exit this method before the task is completed.

Returns

T

The result of the asynchronous operation.

Applies to