private function cancelPending()
    {
        if (!$this->busyQueue->isEmpty()) {
            $exception = new WorkerException('Worker was shut down.');

            do {
                $this->busyQueue->dequeue()->cancel($exception);
            } while (!$this->busyQueue->isEmpty());
        }
    }
private function cancelPending()
    {
        if (!$this->busyQueue->isEmpty()) {
            $exception = new WorkerException('Worker was shut down.');

            do {
                $this->busyQueue->dequeue()->cancel($exception);
            } while (!$this->busyQueue->isEmpty());
        }
    }
private function cancelPending ( ) { if ( ! $ this -> busyQueue -> isEmpty ( ) ) { $ exception = new WorkerException ( 'Worker was shut down.' ) ; do { $ this -> busyQueue -> dequeue ( ) -> cancel ( $ exception ) ; } while ( ! $ this -> busyQueue -> isEmpty ( ) ) ; } }
Cancels all pending tasks.
Cancels all pending tasks .