diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2017-11-16 18:29:37 +0100 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2017-11-16 18:29:37 +0100 |
commit | 1aacb1983848e0e558be711bc1b717de67422abb (patch) | |
tree | 61d8d0fd3d004e8376353e732516c8b88859a230 /src/csharp/Grpc.Core | |
parent | ea6cc57f1e4daf1a99d0de8d0096ba6972aa8dd3 (diff) |
balance queuedContinuationCounter for inlined handlers
Diffstat (limited to 'src/csharp/Grpc.Core')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 3c94b602c0..f7f723c00b 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -176,10 +176,10 @@ namespace Grpc.Core.Internal try { var callback = cq.CompletionRegistry.Extract(tag); - // Use cached delegates to avoid unnecessary allocations + queuedContinuationCounter.Increment(); if (!inlineHandlers) { - queuedContinuationCounter.Increment(); + // Use cached delegates to avoid unnecessary allocations ThreadPool.QueueUserWorkItem(success ? runCompletionQueueEventCallbackSuccess : runCompletionQueueEventCallbackFailure, callback); } else |