SocketConnectionFactoryOptions.UnsafePreferInlineScheduling Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inline application and transport continuations instead of dispatching to the threadpool.
public bool UnsafePreferInlineScheduling { get; set; }
member this.UnsafePreferInlineScheduling : bool with get, set
Public Property UnsafePreferInlineScheduling As Boolean
Property Value
Remarks
This will run application code on the IO thread which is why this is unsafe. It is recommended to set the DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS environment variable to '1' when using this setting to also inline the completions at the runtime layer as well. This setting can make performance worse if there is expensive work that will end up holding onto the IO thread for longer than needed. Test to make sure this setting helps performance.