Suppress ExecutionContext flow in SocketAwaitableEventArgs (#18398)

This commit is contained in:
Ben Adams 2020-01-28 20:36:59 +00:00 committed by Stephen Halter
parent ebb2656e3e
commit 76b0dffb64
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
internal class SocketAwaitableEventArgs : SocketAsyncEventArgs, ICriticalNotifyCompletion
internal sealed class SocketAwaitableEventArgs : SocketAsyncEventArgs, ICriticalNotifyCompletion
{
private static readonly Action _callbackCompleted = () => { };
@ -20,6 +20,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
private Action _callback;
public SocketAwaitableEventArgs(PipeScheduler ioScheduler)
: base(unsafeSuppressExecutionContextFlow: true)
{
_ioScheduler = ioScheduler;
}