public function remove($thread) { if ($thread instanceof Thread or $thread instanceof Worker) { unset($this->{spl_object_hash($thread)}); } }