pocketmine\scheduler\ServerScheduler::scheduleAsyncTaskToWorker PHP Method

scheduleAsyncTaskToWorker() public method

Submits an asynchronous task to a specific Worker in the Pool
public scheduleAsyncTaskToWorker ( AsyncTask $task, integer $worker ) : void
$task AsyncTask
$worker integer
return void
    public function scheduleAsyncTaskToWorker(AsyncTask $task, $worker)
    {
        $id = $this->nextId();
        $task->setTaskId($id);
        $this->asyncPool->submitTaskToWorker($task, $worker);
    }