This commit is contained in:
parent
0e8824a8d2
commit
031682051f
@ -50,7 +50,7 @@ auto tasks::task_wait::wait() const -> bool {
|
||||
auto tasks::schedule(task item) -> task_ptr {
|
||||
++count_;
|
||||
while (not stop_requested_ && (count_ >= task_threads_.size())) {
|
||||
std::this_thread::sleep_for(10ms);
|
||||
std::this_thread::sleep_for(50ms);
|
||||
}
|
||||
|
||||
scheduled_task runnable{item};
|
||||
@ -64,8 +64,6 @@ auto tasks::schedule(task item) -> task_ptr {
|
||||
|
||||
tasks_.push_back(runnable);
|
||||
notify_.notify_all();
|
||||
lock.unlock();
|
||||
|
||||
return runnable.wait;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user