Trying out generic thread pool

This commit is contained in:
Dynamitos committed 2021-10-12 14:20:30 +02:00
1 parent a6f784e6a1
commit 99760724cd
6 files changed
+88 -4

No files matched your search

+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;
}