update mutex usage

This commit is contained in:
Evan Tschannen 2021-03-18 11:18:07 -07:00
parent c53dd4a46f
commit 00f114b976
1 changed files with 2 additions and 0 deletions

View File

@ -1130,9 +1130,11 @@ public:
self->mutex.leave();
for (auto& t : self->instantTasks) {
while (self->orderedTasks.size() && !self->isStopped) {
self->mutex.enter();
Task o = std::move(self->orderedTasks.front());
self->orderedTasks.pop_front();
self->time = o.time;
self->mutex.leave();
self->execTask(o);
self->yielded = false;
}