Do not allocate large write task queues (#1005)

This commit is contained in:
Pavel Krymets 2016-07-21 16:05:50 -07:00 committed by GitHub
parent 7b7e2889ce
commit 6bcf7643df
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
private const int _maxPendingWrites = 3;
private const int _maxBytesPreCompleted = 65536;
private const int _initialTaskQueues = 64;
// Well behaved WriteAsync users should await returned task, so there is no need to allocate more per connection by default
private const int _initialTaskQueues = 1;
private const int _maxPooledWriteContexts = 32;
private static readonly WaitCallback _returnBlocks = (state) => ReturnBlocks((MemoryPoolBlock)state);