JoinableTask<T>.Join Method
Synchronously blocks the calling thread until the operation has completed. If the calling thread is the Main thread, deadlocks are mitigated.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Function Join ( _
cancellationToken As CancellationToken _
) As T
public T Join(
CancellationToken cancellationToken
)
public:
T Join(
CancellationToken cancellationToken
)
member Join :
cancellationToken:CancellationToken -> 'T
public function Join(
cancellationToken : CancellationToken
) : T
Parameters
cancellationToken
Type: System.Threading.CancellationTokenA cancellation token that exits this method before the task is completed.
Return Value
Type: T
Returns a TaskAwaiter<TResult> that is the result of the asynchronous operation.
.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.