SynchronizationContext Class
Provides the basic functionality for propagating a synchronization context in various synchronization models.
System.Threading::SynchronizationContext
System.Windows.Forms::WindowsFormsSynchronizationContext
System.Windows.Threading::DispatcherSynchronizationContext
Assembly: mscorlib (in mscorlib.dll)
The SynchronizationContext type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | CreateCopy | When overridden in a derived class, creates a copy of the synchronization context. |
![]() ![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IsWaitNotificationRequired | Determines if wait notification is required. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | OperationCompleted | When overridden in a derived class, responds to the notification that an operation has completed. |
![]() ![]() | OperationStarted | When overridden in a derived class, responds to the notification that an operation has started. |
![]() ![]() | Post | When overridden in a derived class, dispatches an asynchronous message to a synchronization context. |
![]() ![]() | Send | When overridden in a derived class, dispatches a synchronous message to a synchronization context. |
![]() ![]() | SetSynchronizationContext | Sets the current synchronization context. |
![]() | SetWaitNotificationRequired | Sets notification that wait notification is required and prepares the callback method so it can be called more reliably when a wait occurs. |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | Wait | Waits for any or all the elements in the specified array to receive a signal. |
![]() ![]() | WaitHelper | Helper function that waits for any or all the elements in the specified array to receive a signal. |
The SynchronizationContext class is a base class that provides a free-threaded context with no synchronization.
The purpose of the synchronization model implemented by this class is to allow the internal asynchronous/synchronization operations of the common language runtime to behave properly with different synchronization models. This model also simplifies some of the requirements that managed applications have had to follow in order to work correctly under different synchronization environments.
Providers of synchronization models can extend this class and provide their own implementations for these methods.
- SecurityAction::InheritanceDemand
Inheritors must have SecurityPermissionFlag::ControlPolicy and SecurityPermissionFlag::ControlEvidence.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

