ThreadManager: use array-access instead of variable property access

This commit is contained in:
Dylan K. Taylor 2020-02-05 16:36:11 +00:00
parent fa82cb26d8
commit ad87c11ae1

View File

@ -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)]);
}
}