Commit 82a73263 authored by Marc Gravell's avatar Marc Gravell

use more aggressive PipeOptions - inline scheduler and no sync-context

parent 26908566
......@@ -161,6 +161,9 @@ public void Dispose()
OnDispose();
}
//static readonly PipeOptions PipeOptions = PipeOptions.Default;
static readonly PipeOptions PipeOptions = new PipeOptions(
readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false);
internal SocketToken BeginConnect(EndPoint endpoint, ISocketCallback callback, ConnectionMultiplexer multiplexer, TextWriter log)
{
var addressFamily = endpoint.AddressFamily == AddressFamily.Unspecified ? AddressFamily.InterNetwork : endpoint.AddressFamily;
......@@ -171,7 +174,7 @@ internal SocketToken BeginConnect(EndPoint endpoint, ISocketCallback callback, C
{
var formattedEndpoint = Format.ToString(endpoint);
SocketConnection.ConnectAsync(endpoint, PipeOptions.Default,
SocketConnection.ConnectAsync(endpoint, PipeOptions,
conn => EndConnectAsync(conn, multiplexer, log, callback), socket);
}
catch (NotImplementedException ex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment