diff options
Diffstat (limited to 'Runtime/Threading/JobSystem.h')
-rw-r--r-- | Runtime/Threading/JobSystem.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Runtime/Threading/JobSystem.h b/Runtime/Threading/JobSystem.h new file mode 100644 index 0000000..c95037c --- /dev/null +++ b/Runtime/Threading/JobSystem.h @@ -0,0 +1,22 @@ +#pragma once +#include "Runtime/Utilities/Singleton.h" +#include "Runtime/Threading/Thread.h" +#include <vector> + +class JobSystem : public Singleton<JobSystem> +{ +public: + JobSystem(); + ~JobSystem(); + + void AddJobAtEnd(Job* job); + + void Initilize(int workThreadCount = 1); + void Dispatch(void* param); + +private: + WorkThread* SelectThread(); + + std::vector<WorkThread*> m_Threads; + +};
\ No newline at end of file |