Apparently it is completely broken on linux

This commit is contained in:
Dynamitos
2022-04-02 17:42:07 +02:00
parent 5af5345048
commit 9003ced2df
7 changed files with 188 additions and 53 deletions
+2 -2
View File
@@ -62,10 +62,12 @@ void Event::raise()
if(state->waitingJobs.size() > 0)
{
getGlobalThreadPool().scheduleBatch(state->waitingJobs);
state->waitingJobs.clear();
}
if(state->waitingMainJobs.size() > 0)
{
getGlobalThreadPool().scheduleBatch(state->waitingMainJobs);
state->waitingMainJobs.clear();
}
}
void Event::reset()
@@ -87,14 +89,12 @@ bool Event::await_ready()
void Event::await_suspend(std::coroutine_handle<JobPromiseBase<false>> h)
{
//h.promise().enqueue(this);
state->waitingJobs.add(JobBase<false>(&h.promise()));
eventLock.unlock();
}
void Event::await_suspend(std::coroutine_handle<JobPromiseBase<true>> h)
{
//h.promise().enqueue(this);
state->waitingMainJobs.add(JobBase<true>(&h.promise()));
eventLock.unlock();
}