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
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task<T>
Returns Task<TResult>.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.