/** * Pushes certain thread to the collection * @param Generic Generic to push * @return void */ public function push(Generic $thread) { $id = ++$this->spawnCounter; $thread->setId($id); $this->threads[$id] = $thread; }