removeTasks() public method

public removeTasks ( )
コード例 #1
0
 public function cancelAllTasks()
 {
     foreach ($this->tasks as $task) {
         $task->cancel();
     }
     $this->tasks = [];
     $this->asyncPool->removeTasks();
     $this->queue = new ReversePriorityQueue();
     $this->ids = 1;
 }
コード例 #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;
 }