/** * Run the idle function. */ public function idle(Processor $processor) { foreach ($processor->active_threads as $_key => $_thread) { // Add better checks $_thread[1]->join(); if ($_thread[1]->isRunning() === false) { unset($processor->active_threads[$_key]); } } parent::idle($processor); }