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/10/14 21:35:12 UTC
git commit: THRIFT-2786 Cpp Tutorial: Make TThreadPoolServer /
TThreadedServer a bit easier to use Client: C++ Patch: Brian Brooks
Repository: thrift
Updated Branches:
refs/heads/master 157691fa9 -> 04a4c152f
THRIFT-2786 Cpp Tutorial: Make TThreadPoolServer / TThreadedServer a bit easier to use
Client: C++
Patch: Brian Brooks
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/04a4c152
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/04a4c152
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/04a4c152
Branch: refs/heads/master
Commit: 04a4c152f5c0d0f1b218f1b6cff5dceba00afca2
Parents: 157691f
Author: Jens Geyer <je...@apache.org>
Authored: Tue Oct 14 21:30:28 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Oct 14 21:30:28 2014 +0200
----------------------------------------------------------------------
tutorial/cpp/CppServer.cpp | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/04a4c152/tutorial/cpp/CppServer.cpp
----------------------------------------------------------------------
diff --git a/tutorial/cpp/CppServer.cpp b/tutorial/cpp/CppServer.cpp
index 653caaa..f7a69e2 100644
--- a/tutorial/cpp/CppServer.cpp
+++ b/tutorial/cpp/CppServer.cpp
@@ -35,6 +35,7 @@
using namespace std;
using namespace apache::thrift;
+using namespace apache::thrift::concurrency;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
using namespace apache::thrift::server;
@@ -125,6 +126,8 @@ int main(int argc, char **argv) {
/**
* Or you could do one of these
+ const int workerCount = 4;
+
boost::shared_ptr<ThreadManager> threadManager =
ThreadManager::newSimpleThreadManager(workerCount);
boost::shared_ptr<PosixThreadFactory> threadFactory =