diff options
author | 2015-07-16 21:03:49 -0700 | |
---|---|---|
committer | 2015-07-16 21:03:49 -0700 | |
commit | fb58d239ef360b4fcdeeda358e46bb107ceceaa4 (patch) | |
tree | 5768a672fc92eacf5c4a573b3d52c1b3723bc738 /src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs | |
parent | 7ef7232dd9eba4be7d81b59a6bb59c4fd634ea08 (diff) | |
parent | 65ef0fffaecf8396cb93b3a76416d099f7b07438 (diff) |
Merge with head
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 89b44a4e2b..b77e893044 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -45,14 +45,16 @@ namespace Grpc.Core.Internal /// </summary> internal class GrpcThreadPool { + readonly GrpcEnvironment environment; readonly object myLock = new object(); readonly List<Thread> threads = new List<Thread>(); readonly int poolSize; CompletionQueueSafeHandle cq; - public GrpcThreadPool(int poolSize) + public GrpcThreadPool(GrpcEnvironment environment, int poolSize) { + this.environment = environment; this.poolSize = poolSize; } @@ -80,7 +82,7 @@ namespace Grpc.Core.Internal { cq.Shutdown(); - Console.WriteLine("Waiting for GPRC threads to finish."); + Console.WriteLine("Waiting for GRPC threads to finish."); foreach (var thread in threads) { thread.Join(); @@ -122,7 +124,7 @@ namespace Grpc.Core.Internal IntPtr tag = ev.tag; try { - var callback = GrpcEnvironment.CompletionRegistry.Extract(tag); + var callback = environment.CompletionRegistry.Extract(tag); callback(success); } catch (Exception e) |