PocketMine
ServerScheduler Class Reference

Public Member Functions

 scheduleTask (Task $task)
 
 scheduleAsyncTask (AsyncTask $task)
 
 scheduleAsyncTaskToWorker (AsyncTask $task, $worker)
 
 getAsyncTaskPoolSize ()
 
 increaseAsyncTaskPoolSize ($newSize)
 
 scheduleDelayedTask (Task $task, $delay)
 
 scheduleRepeatingTask (Task $task, $period)
 
 scheduleDelayedRepeatingTask (Task $task, $delay, $period)
 
 cancelTask ($taskId)
 
 cancelTasks (Plugin $plugin)
 
 cancelAllTasks ()
 
 isQueued ($taskId)
 

Static Public Attributes

static $WORKERS = 2
 

Protected Attributes

 $queue
 
 $tasks = []
 
 $asyncPool
 
 $currentTick = 0
 

Member Function Documentation

cancelTask (   $taskId)
Parameters
int$taskId
cancelTasks ( Plugin  $plugin)
Parameters
Plugin$plugin
isQueued (   $taskId)
Parameters
int$taskId
Returns
bool
scheduleAsyncTask ( AsyncTask  $task)

Submits an asynchronous task to the Worker Pool

Parameters
AsyncTask$task
Returns
void
scheduleAsyncTaskToWorker ( AsyncTask  $task,
  $worker 
)

Submits an asynchronous task to a specific Worker in the Pool

Parameters
AsyncTask$task
int$worker
Returns
void
scheduleDelayedRepeatingTask ( Task  $task,
  $delay,
  $period 
)
Parameters
Task$task
int$delay
int$period
Returns
null|TaskHandler
scheduleDelayedTask ( Task  $task,
  $delay 
)
Parameters
Task$task
int$delay
Returns
null|TaskHandler
scheduleRepeatingTask ( Task  $task,
  $period 
)
Parameters
Task$task
int$period
Returns
null|TaskHandler
scheduleTask ( Task  $task)
Parameters
Task$task
Returns
null|TaskHandler

The documentation for this class was generated from the following file: