summaryrefslogtreecommitdiff
path: root/thirdparty/etcpak/TaskDispatch.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/etcpak/TaskDispatch.hpp')
-rw-r--r--thirdparty/etcpak/TaskDispatch.hpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/thirdparty/etcpak/TaskDispatch.hpp b/thirdparty/etcpak/TaskDispatch.hpp
deleted file mode 100644
index b513de4c0c..0000000000
--- a/thirdparty/etcpak/TaskDispatch.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __DARKRL__TASKDISPATCH_HPP__
-#define __DARKRL__TASKDISPATCH_HPP__
-
-#include <atomic>
-#include <condition_variable>
-#include <functional>
-#include <mutex>
-#include <thread>
-#include <vector>
-
-class TaskDispatch
-{
-public:
- TaskDispatch( size_t workers );
- ~TaskDispatch();
-
- static void Queue( const std::function<void(void)>& f );
- static void Queue( std::function<void(void)>&& f );
-
- static void Sync();
-
-private:
- void Worker();
-
- std::vector<std::function<void(void)>> m_queue;
- std::mutex m_queueLock;
- std::condition_variable m_cvWork, m_cvJobs;
- std::atomic<bool> m_exit;
- size_t m_jobs;
-
- std::vector<std::thread> m_workers;
-};
-
-#endif