Forgot this one
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664726 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Exception.h b/lib/cpp/src/concurrency/Exception.h
new file mode 100644
index 0000000..5907f02
--- /dev/null
+++ b/lib/cpp/src/concurrency/Exception.h
@@ -0,0 +1,20 @@
+#if !defined(_concurrency_Exception_h_)
+#define _concurrency_Exception_h_ 1
+
+#include <exception>
+
+namespace facebook { namespace thrift { namespace concurrency {
+
+class NoSuchTaskException : public std::exception {};
+
+class UncancellableTaskException : public std::exception {};
+
+class InvalidArgumentException : public std::exception {};
+
+class IllegalStateException : public std::exception {};
+
+class TimedOutException : public std::exception {};
+
+}}} // facebook::thrift::concurrency
+
+#endif // !defined(_concurrency_Exception_h_)
diff --git a/lib/cpp/src/concurrency/ThreadManager.cc b/lib/cpp/src/concurrency/ThreadManager.cc
index f8a5c22..69a96ff 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cc
+++ b/lib/cpp/src/concurrency/ThreadManager.cc
@@ -414,8 +414,8 @@
return new ThreadManager::Impl();
}
-ThreadManager* ThreadManager::newSimpleThreadManager() {
- return new SimpleThreadManager();
+ThreadManager* ThreadManager::newSimpleThreadManager(size_t count) {
+ return new SimpleThreadManager(count);
}
}}} // facebook::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/ThreadManager.h b/lib/cpp/src/concurrency/ThreadManager.h
index 3b87c21..596471d 100644
--- a/lib/cpp/src/concurrency/ThreadManager.h
+++ b/lib/cpp/src/concurrency/ThreadManager.h
@@ -66,7 +66,9 @@
static ThreadManager* newThreadManager();
- static ThreadManager* newSimpleThreadManager();
+ /** Creates a simple thread manager the uses count number of worker threads */
+
+ static ThreadManager* newSimpleThreadManager(size_t count=4);
class Task;