check isStopped between each task
This commit is contained in:
parent
e825008431
commit
c53dd4a46f
|
@ -1129,13 +1129,16 @@ public:
|
|||
});
|
||||
self->mutex.leave();
|
||||
for (auto& t : self->instantTasks) {
|
||||
while (self->orderedTasks.size()) {
|
||||
while (self->orderedTasks.size() && !self->isStopped) {
|
||||
Task o = std::move(self->orderedTasks.front());
|
||||
self->orderedTasks.pop_front();
|
||||
self->time = o.time;
|
||||
self->execTask(o);
|
||||
self->yielded = false;
|
||||
}
|
||||
if (self->isStopped) {
|
||||
break;
|
||||
}
|
||||
self->execTask(t);
|
||||
self->yielded = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue