mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 17:59:41 +00:00
Decrease async worker task amount after crashed task
This commit is contained in:
parent
5bf5014b60
commit
9c28f0a5be
@ -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()]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user