diff options
author | 2016-05-25 19:20:39 -0400 | |
---|---|---|
committer | 2016-05-25 18:00:38 -0700 | |
commit | b089320d405f09e36b78c037e04a1991934428b2 (patch) | |
tree | 18d9756cf9a349dd98c1c849604acd7c7b7881f5 /src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs | |
parent | 2a84f238af8a7dab55a998e5b0254dbc10914180 (diff) |
completion registry is per cq
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 27dcea7118..4059247e30 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -75,7 +75,7 @@ namespace Grpc.Core.Internal lock (myLock) { GrpcPreconditions.CheckState(completionQueues == null, "Already started."); - completionQueues = CreateCompletionQueueList(completionQueueCount); + completionQueues = CreateCompletionQueueList(environment, completionQueueCount); for (int i = 0; i < poolSize; i++) { @@ -152,12 +152,13 @@ namespace Grpc.Core.Internal while (ev.type != CompletionQueueEvent.CompletionType.Shutdown); } - private static IReadOnlyCollection<CompletionQueueSafeHandle> CreateCompletionQueueList(int completionQueueCount) + private static IReadOnlyCollection<CompletionQueueSafeHandle> CreateCompletionQueueList(GrpcEnvironment environment, int completionQueueCount) { var list = new List<CompletionQueueSafeHandle>(); for (int i = 0; i < completionQueueCount; i++) { - list.Add(CompletionQueueSafeHandle.Create()); + var completionRegistry = new CompletionRegistry(environment); + list.Add(CompletionQueueSafeHandle.Create(completionRegistry)); } return list.AsReadOnly(); } |