protected function removeWorker(\CharlotteDunois\Phoebe\Worker $worker) {
        $msgs = $worker->getMessages();
        while($message = $msgs->shift()) {
            $this->handleMessage($worker, $message);
        }
        
        unset($this->workers[$worker->id]);
        $this->busyWorkers->delete($worker);
        
        $size = $this->freeWorkers->count();
        for($i = 0; $i < $size; $i++) {
            $free = $this->freeWorkers->dequeue();
            if($free === $worker) {
                break;
            }
            
            $this->freeWorkers->enqueue($free);
        }
    }