Open sandboxFocus

Class ThreadingServices

Exposes methods to work with the PostSharp.Patterns.Threading namespace.

Inheritance
ThreadingServices
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
public static class ThreadingServices

Properties

Name Description
SynchronizationContextComparer

Gets or sets the comparer used to determine if two SynchronizationContext are equivalent.

Methods

Name Description
WaitForInitialization(IThreadAware, TimeSpan?, CancellationToken)

Actively waits for initialization of a thread aware object, i.e. for the constructor to complete.

WithConcurrencyController(IConcurrencyController)

Sets the ambient concurrency controller for the current thread. Until the returned AmbientConcurrencyControllerContext value is disposed, thread-aware objects created in the current thread will be assigned to the given concurrency controller.

Events

Name Description
DeadlockDetected

Event raised by implementation of the DeadlockDetectionPolicy aspect.

UnhandledException

Event raised by the implementation of the ActorAttribute, DispatchedAttribute and BackgroundAttribute aspects when an unhandled exception is encountered.