version 0.3.0
[fms.git] / include / threadwrapper / threadedexecutor.h
diff --git a/include/threadwrapper/threadedexecutor.h b/include/threadwrapper/threadedexecutor.h
new file mode 100644 (file)
index 0000000..7819120
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _threadedexecutor_\r
+#define _threadedexecutor_\r
+\r
+#include "cancelablerunnable.h"\r
+#include "cancelablethread.h"\r
+\r
+#include <vector>\r
+\r
+class ThreadedExecutor\r
+{\r
+public:\r
+       ~ThreadedExecutor();\r
+\r
+       void Start(CancelableRunnable *runnable);\r
+\r
+       void Join();\r
+       void Cancel();\r
+\r
+private:\r
+       void CleanupCompleted();\r
+\r
+       std::vector<CancelableThread *> m_threads;\r
+};\r
+\r
+#endif // _threadedexecutor_\r