Partager via


SingleThreadedSynchronizationContext Class

Definition

A single-threaded synchronization context, akin to the DispatcherSynchronizationContext and WindowsFormsSynchronizationContext.

public ref class SingleThreadedSynchronizationContext : System::Threading::SynchronizationContext
public class SingleThreadedSynchronizationContext : System.Threading.SynchronizationContext
type SingleThreadedSynchronizationContext = class
    inherit SynchronizationContext
Public Class SingleThreadedSynchronizationContext
Inherits SynchronizationContext
Inheritance
SingleThreadedSynchronizationContext

Remarks

This must be created on the thread that will serve as the pumping thread.

Constructors

SingleThreadedSynchronizationContext()

Initializes a new instance of the SingleThreadedSynchronizationContext class, with the new instance affinitized to the current thread.

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.

PushFrame(SingleThreadedSynchronizationContext+Frame)

Pushes a message pump on the current thread that will execute work scheduled using Post(SendOrPostCallback, Object).

Send(SendOrPostCallback, Object)

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

Applies to