mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Avoid more $this refs on long-life closures
This commit is contained in:
@@ -447,8 +447,9 @@ class World implements ChunkManager{
|
||||
unset($this->generatorRegisteredWorkers[$workerId]);
|
||||
}
|
||||
});
|
||||
$this->addOnUnloadCallback(function() use ($workerStartHook) : void{
|
||||
$this->workerPool->removeWorkerStartHook($workerStartHook);
|
||||
$workerPool = $this->workerPool;
|
||||
$this->addOnUnloadCallback(static function() use ($workerPool, $workerStartHook) : void{
|
||||
$workerPool->removeWorkerStartHook($workerStartHook);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user