JoinableTaskFactory.WaitSynchronously(Task) Method

Definition

Synchronously blocks the calling thread for the completion of the specified task. If running on the main thread, any applicable message pump is suppressed while the thread sleeps.

protected public:
 virtual void WaitSynchronously(System::Threading::Tasks::Task ^ task);
protected internal virtual void WaitSynchronously (System.Threading.Tasks.Task task);
abstract member WaitSynchronously : System.Threading.Tasks.Task -> unit
override this.WaitSynchronously : System.Threading.Tasks.Task -> unit
Protected Friend Overridable Sub WaitSynchronously (task As Task)

Parameters

task
Task

The task whose completion is being waited on.

Remarks

Implementations should take care that exceptions from faulted or canceled tasks not be thrown back to the caller.

Applies to