pocketmine\scheduler\AsyncTask::onCompletion PHP 메소드

onCompletion() 공개 메소드

Actions to execute when completed (on main thread) Implement this if you want to handle the data in your AsyncTask after it has been processed
public onCompletion ( Server $server ) : void
$server pocketmine\Server
리턴 void
    public function onCompletion(Server $server)
    {
    }

Usage Example

예제 #1
0
 public function collectAsyncTask(AsyncTask $task)
 {
     if ($task->isFinished() and !$task->isCompleted()) {
         --$this->asyncTasks;
         $task->onCompletion(Server::getInstance());
         $task->setCompleted();
         unset($this->asyncTaskStorage[$task->getTaskId()]);
         return true;
     }
     return false;
 }