--- /dev/null
+#ifndef _pthread_threadedexecutor_\r
+#define _pthread_threadedexecutor_\r
+\r
+#include "noncopyable.h"\r
+#include "runnable.h"\r
+#include <vector>\r
+\r
+namespace PThread\r
+{\r
+\r
+class ThreadedExecutor:public NonCopyable\r
+{\r
+public:\r
+ ThreadedExecutor() {}\r
+ ~ThreadedExecutor();\r
+\r
+ void Execute(Runnable *runnable);\r
+ \r
+ void Join();\r
+ void Cancel();\r
+\r
+private:\r
+ void CleanupFinished();\r
+ \r
+ std::vector<Thread *> m_threads;\r
+};\r
+\r
+}\r
+\r
+#endif // _pthread_threadedexecutor_\r