Share via


SocketTransportOptions.UnsafePreferInlineScheduling Property

Definition

Inline application and transport continuations instead of dispatching to the threadpool.

public:
 property bool UnsafePreferInlineScheduling { bool get(); void set(bool value); };
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.

Applies to