次の方法で共有


ServiceRpcDescriptor.RpcOrderPreservingSynchronizationContext Class

Definition

Caution

Use Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext instead.

A SynchronizationContext that preserves message order.

protected: ref class ServiceRpcDescriptor::RpcOrderPreservingSynchronizationContext : System::Threading::SynchronizationContext, IDisposable
[System.Obsolete("Use Microsoft.VisualStudio.Threading.NonConcurrentSynchronizationContext instead.")]
protected class ServiceRpcDescriptor.RpcOrderPreservingSynchronizationContext : System.Threading.SynchronizationContext, IDisposable
Protected Class ServiceRpcDescriptor.RpcOrderPreservingSynchronizationContext
Inherits SynchronizationContext
Implements IDisposable
Inheritance
ServiceRpcDescriptor.RpcOrderPreservingSynchronizationContext
Attributes
Implements

Remarks

Delegates will be invoked on the threadpool in the order they were posted with Post(SendOrPostCallback, Object). No two delegates will ever be executed concurrently. 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.

This SynchronizationContext is not a fully functional one, and is intended only for use with JsonRpc to preserve RPC order. It should not be set as the CurrentSynchronizationContext.

Constructors

ServiceRpcDescriptor.RpcOrderPreservingSynchronizationContext()

Initializes a new instance of the ServiceRpcDescriptor.RpcOrderPreservingSynchronizationContext class.

Methods

CreateCopy()

Throws NotSupportedException.

Dispose()

Causes this SynchronizationContext to reject all future posted work and releases the queue processor when it is empty.

Post(SendOrPostCallback, Object)

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

Send(SendOrPostCallback, Object)

Throws NotSupportedException.

Events

UnhandledException

Occurs when posted work throws an unhandled exception.

Applies to