JoinableTask.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 caller is on the Main thread (or is executing within a JoinableTask that has access to the main thread) the caller's access to the Main thread propagates to this JoinableTask so that it may also access the main thread.
public void Join (System.Threading.CancellationToken cancellationToken = default);
member this.Join : System.Threading.CancellationToken -> unit
Public Sub Join (Optional cancellationToken As CancellationToken = Nothing)
Parameters
- cancellationToken
- CancellationToken
A cancellation token that will exit this method before the task is completed.
Exceptions
Thrown when cancellationToken
is canceled.
Remarks
Any exception thrown by the asynchronous operation is propagated out to the caller of this method.