Collect workers when cancelling all tasks

This commit is contained in:
Dylan K. Taylor 2017-05-17 19:30:50 +01:00
parent 00e6d6a6b1
commit 568e2760f1

View File

@ -136,6 +136,14 @@ class AsyncPool{
$this->taskWorkers = [];
$this->tasks = [];
$this->collectWorkers();
}
private function collectWorkers(){
foreach($this->workers as $worker){
$worker->collect();
}
}
public function collectTasks(){
@ -158,9 +166,7 @@ class AsyncPool{
}
}
foreach($this->workers as $worker){
$worker->collect();
}
$this->collectWorkers();
Timings::$schedulerAsyncTimer->stopTiming();
}