JoinableTask<T>.Join(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.
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.