Decrease async worker task amount after crashed task

This commit is contained in:
Shoghi Cervantes 2015-01-05 02:41:14 +01:00
parent 5bf5014b60
commit 9c28f0a5be
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -74,7 +74,8 @@ class AsyncPool{
private function removeTask(AsyncTask $task){
if(isset($this->taskWorkers[$task->getTaskId()])){
$this->workers[$this->taskWorkers[$task->getTaskId()]]->unstack($task);
$this->workers[$w = $this->taskWorkers[$task->getTaskId()]]->unstack($task);
$this->workerUsage[$w]--;
}
unset($this->tasks[$task->getTaskId()]);