refactor
This commit is contained in:
@ -32,12 +32,10 @@ void tasks::schedule(task_item task) {
|
|||||||
notify_.wait(lock);
|
notify_.wait(lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stop_requested_) {
|
if (not stop_requested_) {
|
||||||
notify_.notify_all();
|
tasks_.push_back(std::move(task));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks_.push_back(std::move(task));
|
|
||||||
notify_.notify_all();
|
notify_.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user