SetSynchronizationContext()

SynchronizationContext::SetSynchronizationContext(const SharedPtr<SynchronizationContext>&) method

Sets the synchronization context for the current thread.

static void System::Threading::SynchronizationContext::SetSynchronizationContext(const SharedPtr<SynchronizationContext> &syncContext)

Arguments

ParameterTypeDescription
syncContextconst SharedPtr<SynchronizationContext>&The synchronization context to set for the current thread.

Remarks

Passing nullptr will clear the synchronization context for the current thread.

See Also