private function waitForAllToFinish(): void
    {
        do {
            foreach ($this->workers as $key => $worker) {
                if (!$worker->isRunning()) {
                    unset($this->workers[$key]);
                }
            }
            usleep(10000);
            $this->printOutput();
        } while (\count($this->workers) > 0);
    }