pocketmine\scheduler\AsyncTask::getTaskId PHP Method

getTaskId() public method

public getTaskId ( )
    public function getTaskId()
    {
        return $this->taskId;
    }

Usage Example

Example #1
0
 private function removeTask(AsyncTask $task, $force = false)
 {
     if (isset($this->taskWorkers[$task->getTaskId()])) {
         if (!$force and ($task->isRunning() or !$task->isGarbage())) {
             return;
         }
         $this->workerUsage[$this->taskWorkers[$task->getTaskId()]]--;
     }
     unset($this->tasks[$task->getTaskId()]);
     unset($this->taskWorkers[$task->getTaskId()]);
     $task->cleanObject();
 }
All Usage Examples Of pocketmine\scheduler\AsyncTask::getTaskId