Delen via


JoinableTask<T>.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 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(Of T)
public Task<T> JoinAsync(
    CancellationToken cancellationToken
)
public:
Task<T>^ JoinAsync(
    CancellationToken cancellationToken
)
member JoinAsync : 
        cancellationToken:CancellationToken -> Task<'T> 
public function JoinAsync(
    cancellationToken : CancellationToken
) : Task<T>

Parameters

Return Value

Type: System.Threading.Tasks.Task<T>
Returns Task<TResult>.

.NET Framework Security

See Also

Reference

JoinableTask<T> Class

Microsoft.VisualStudio.Threading Namespace