Always use TaskCreationOptions.RunContinuationsAsynchronously (#1966)
This commit is contained in:
parent
1ae901de3d
commit
7563ccae20
|
|
@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Http.Connections
|
|||
|
||||
// This tcs exists so that multiple calls to DisposeAsync all wait asynchronously
|
||||
// on the same task
|
||||
private readonly TaskCompletionSource<object> _disposeTcs = new TaskCompletionSource<object>();
|
||||
private readonly TaskCompletionSource<object> _disposeTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the DefaultConnectionContext without Pipes to avoid upfront allocations.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.SignalR
|
|||
private readonly ConnectionContext _connectionContext;
|
||||
private readonly ILogger _logger;
|
||||
private readonly CancellationTokenSource _connectionAbortedTokenSource = new CancellationTokenSource();
|
||||
private readonly TaskCompletionSource<object> _abortCompletedTcs = new TaskCompletionSource<object>();
|
||||
private readonly TaskCompletionSource<object> _abortCompletedTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
private readonly long _keepAliveDuration;
|
||||
private readonly SemaphoreSlim _writeLock = new SemaphoreSlim(1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue