diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 3c94b602c0d..f7f723c00bb 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