removeTasks() public method

public removeTasks ( )
Ejemplo n.º 1
0
 public function cancelAllTasks()
 {
     foreach ($this->tasks as $task) {
         $task->cancel();
     }
     $this->tasks = [];
     $this->asyncPool->removeTasks();
     $this->queue = new ReversePriorityQueue();
     $this->ids = 1;
 }
Ejemplo n.º 2
0
 public function cancelAllTasks()
 {
     foreach ($this->tasks as $task) {
         $task->cancel();
     }
     $this->tasks = [];
     $this->asyncPool->removeTasks();
     while (!$this->queue->isEmpty()) {
         $this->queue->extract();
     }
     $this->ids = 1;
 }