PostSharp 6.7 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Threading Namespace / Dispatched­Execution­Mode Enumeration

DispatchedExecutionMode Enumeration

Determines whether the caller of a dispatched method (see DispatchedAttribute) waits for the called method.

Namespace:  PostSharp.Patterns.Threading
Assembly:  PostSharp.Patterns.Threading (in PostSharp.Patterns.Threading.dll) Version: 6.7.12.0 (6.7.12.0)
Syntax
C#
public enum DispatchedExecutionMode
Members
  Member nameValueDescription
Default0 Default (Blocking).
Blocking0 The caller waits for the called method in all cases.
NonBlocking1 The caller never waits for the called method. The method is enqueued for later execution even on the same context. Methods that have a non-void return type or ref or out parameters cannot be dispatched in non-blocking mode.
NonBlockingContextSwitch2 If the caller context equals the target context (e.g. if the caller is the UI thread and the object is affine to the UI thread), the method is invoked immediately in the current context in a blocking way. Otherwise, if a context switch is necessary, the method call is enqueued for later execution and the caller continues without waiting. Methods that have a non-void return type or ref or out parameters cannot be dispatched in non-blocking mode.
See Also