mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 19:37:17 +00:00
ThreadManager: use array-access instead of variable property access
This commit is contained in:
parent
fa82cb26d8
commit
ad87c11ae1
@ -52,7 +52,7 @@ class ThreadManager extends \Volatile{
|
||||
*/
|
||||
public function add($thread){
|
||||
if($thread instanceof Thread or $thread instanceof Worker){
|
||||
$this->{spl_object_hash($thread)} = $thread;
|
||||
$this[spl_object_hash($thread)] = $thread;
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ class ThreadManager extends \Volatile{
|
||||
*/
|
||||
public function remove($thread){
|
||||
if($thread instanceof Thread or $thread instanceof Worker){
|
||||
unset($this->{spl_object_hash($thread)});
|
||||
unset($this[spl_object_hash($thread)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user