mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Scheduler: shutdown async pool properly instead of relying on ThreadManager
This commit is contained in:
@ -183,4 +183,13 @@ class AsyncPool{
|
||||
|
||||
Timings::$schedulerAsyncTimer->stopTiming();
|
||||
}
|
||||
|
||||
public function shutdown() : void{
|
||||
$this->collectTasks();
|
||||
$this->removeTasks();
|
||||
foreach($this->workers as $worker){
|
||||
$worker->quit();
|
||||
}
|
||||
$this->workers = [];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user