NonConcurrentSynchronizationContext Class

Definition

A SynchronizationContext that executes messages in the order they are received.

public ref class NonConcurrentSynchronizationContext sealed : System::Threading::SynchronizationContext
public sealed class NonConcurrentSynchronizationContext : System.Threading.SynchronizationContext
type NonConcurrentSynchronizationContext = class
    inherit SynchronizationContext
Public NotInheritable Class NonConcurrentSynchronizationContext
Inherits SynchronizationContext
Inheritance
NonConcurrentSynchronizationContext

Remarks

Delegates will be invoked in the order they are received on the threadpool. No two delegates will ever be executed concurrently, but Send(SendOrPostCallback, Object) may permit a delegate to execute inline on another. Note that if the delegate invokes an async method, the delegate formally ends when the async method yields for the first time or returns, whichever comes first. Once that delegate returns the next delegate can be executed.

Constructors

NonConcurrentSynchronizationContext(Boolean)

Initializes a new instance of the NonConcurrentSynchronizationContext class.

Methods

CreateCopy()

When overridden in a derived class, creates a copy of the synchronization context.

Post(SendOrPostCallback, Object)

When overridden in a derived class, dispatches an asynchronous message to a synchronization context.

Send(SendOrPostCallback, Object)

When overridden in a derived class, dispatches a synchronous message to a synchronization context.

Events

UnhandledException

Occurs when posted work throws an unhandled exception.

Applies to