Enum SyncContextMode
Enumerates the SyncContext modes, configured by setting Mode.
Namespace: Neon.Tasks
Assembly: Neon.Common.dll
Syntax
public enum SyncContextMode
Fields
Name | Description |
---|---|
ClearAndYield | Enables `await SyncContext.Clear;` such that the continuations within the nested scope of the method will not happen on the original thread and that the awaitee can immediately release the current thread for other uses. This mode is useful for UI applications because it ensures that any synchronous operations won't be executed on the original thread. |
ClearOnly | Enables `await SyncContext.Clear;` such that the continuations within the nested scope of the method will not happen on the original thread. This mode is the default and is generally suitable for server and other non-UI applications. |