Compartilhar via


JoinableTask.JoinAsync Method

Joins any main thread affinity of the caller with the asynchronous operation. This is to avoid deadlocks in case the main thread ultimately synchronously blocks while it is waiting for the operation to complete.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
Public Function JoinAsync ( _
    cancellationToken As CancellationToken _
) As Task
public Task JoinAsync(
    CancellationToken cancellationToken
)
public:
Task^ JoinAsync(
    CancellationToken cancellationToken
)
member JoinAsync : 
        cancellationToken:CancellationToken -> Task
public function JoinAsync(
    cancellationToken : CancellationToken
) : Task

Parameters

Return Value

Type: System.Threading.Tasks.Task
A Task that completes after the asynchronous operation completes and the join is reverted..

.NET Framework Security

See Also

Reference

JoinableTask Class

Microsoft.VisualStudio.Threading Namespace