Trying out generic thread pool

This commit is contained in:
Dynamitos
2021-10-12 14:20:30 +02:00
parent a6f784e6a1
commit 99760724cd
6 changed files with 88 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "ThreadPool.h"
using namespace Seele;
static ThreadPool gThreadPool;
Job JobPromise::get_return_object() noexcept {
return Job { std::coroutine_handle<JobPromise>::from_promise(*this) };
}
ThreadPool::ThreadPool(uint32 threadCount)
: workers(threadCount)
{
}
static ThreadPool& getGlobalThreadPool()
{
return gThreadPool;
}