THRIFT-4730: remove pthread code and refactor, ending up with just ThreadFactory
diff --git a/lib/cpp/test/processor/ProcessorTest.cpp b/lib/cpp/test/processor/ProcessorTest.cpp
index 36ce013..9483a0e 100644
--- a/lib/cpp/test/processor/ProcessorTest.cpp
+++ b/lib/cpp/test/processor/ProcessorTest.cpp
@@ -25,7 +25,7 @@
#include <boost/test/unit_test.hpp>
-#include <thrift/concurrency/PlatformThreadFactory.h>
+#include <thrift/concurrency/ThreadFactory.h>
#include <thrift/concurrency/Monitor.h>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TThreadedServer.h>
@@ -94,7 +94,7 @@
const std::shared_ptr<TProtocolFactory>& protocolFactory) {
std::shared_ptr<TServerSocket> socket(new TServerSocket(port));
- std::shared_ptr<PlatformThreadFactory> threadFactory(new PlatformThreadFactory);
+ std::shared_ptr<ThreadFactory> threadFactory(new ThreadFactory);
std::shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(8);
threadManager->threadFactory(threadFactory);
threadManager->start();
@@ -123,7 +123,7 @@
}
std::shared_ptr<TNonblockingServerSocket> socket(new TNonblockingServerSocket(port));
- std::shared_ptr<PlatformThreadFactory> threadFactory(new PlatformThreadFactory);
+ std::shared_ptr<ThreadFactory> threadFactory(new ThreadFactory);
std::shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(8);
threadManager->threadFactory(threadFactory);
threadManager->start();
diff --git a/lib/cpp/test/processor/ServerThread.cpp b/lib/cpp/test/processor/ServerThread.cpp
index 4d1ec4c..b050500 100644
--- a/lib/cpp/test/processor/ServerThread.cpp
+++ b/lib/cpp/test/processor/ServerThread.cpp
@@ -21,7 +21,7 @@
#include "ServerThread.h"
-#include <thrift/concurrency/PlatformThreadFactory.h>
+#include <thrift/concurrency/ThreadFactory.h>
#include <thrift/concurrency/ThreadManager.h>
#include <thrift/server/TThreadPoolServer.h>
#include <thrift/transport/TBufferTransports.h>
@@ -38,7 +38,7 @@
helper_.reset(new Helper(this));
// Start the other thread
- concurrency::PlatformThreadFactory threadFactory;
+ concurrency::ThreadFactory threadFactory;
threadFactory.setDetached(false);
thread_ = threadFactory.newThread(helper_);