You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2014/05/28 22:37:03 UTC
git commit: THRIFT-1584 could not SetMinThreads in ThreadPool on
single-core machines Client: C# Patch: Jens Geyer after suggestion from
JIRA-User "Funny"
Repository: thrift
Updated Branches:
refs/heads/master 97243a73e -> 4b0fede14
THRIFT-1584 could not SetMinThreads in ThreadPool on single-core machines
Client: C#
Patch: Jens Geyer after suggestion from JIRA-User "Funny"
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/4b0fede1
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/4b0fede1
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/4b0fede1
Branch: refs/heads/master
Commit: 4b0fede142950c31ac04460221021ebc2800c0db
Parents: 97243a7
Author: Jens Geyer <je...@apache.org>
Authored: Wed May 28 22:31:23 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Wed May 28 22:35:15 2014 +0200
----------------------------------------------------------------------
lib/csharp/src/Server/TThreadPoolServer.cs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/4b0fede1/lib/csharp/src/Server/TThreadPoolServer.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/src/Server/TThreadPoolServer.cs b/lib/csharp/src/Server/TThreadPoolServer.cs
index b257fd8..7ddabf7 100644
--- a/lib/csharp/src/Server/TThreadPoolServer.cs
+++ b/lib/csharp/src/Server/TThreadPoolServer.cs
@@ -75,16 +75,16 @@ namespace Thrift.Server
:base(processor, serverTransport, inputTransportFactory, outputTransportFactory,
inputProtocolFactory, outputProtocolFactory, logDel)
{
- lock (typeof(TThreadPoolServer))
- {
- if (!ThreadPool.SetMinThreads(minThreadPoolThreads, minThreadPoolThreads))
- {
- throw new Exception("Error: could not SetMinThreads in ThreadPool");
- }
- if (!ThreadPool.SetMaxThreads(maxThreadPoolThreads, maxThreadPoolThreads))
- {
- throw new Exception("Error: could not SetMaxThreads in ThreadPool");
- }
+ lock (typeof(TThreadPoolServer))
+ {
+ if (!ThreadPool.SetMaxThreads(maxThreadPoolThreads, maxThreadPoolThreads))
+ {
+ throw new Exception("Error: could not SetMaxThreads in ThreadPool");
+ }
+ if (!ThreadPool.SetMinThreads(minThreadPoolThreads, minThreadPoolThreads))
+ {
+ throw new Exception("Error: could not SetMinThreads in ThreadPool");
+ }
}
}