PocketMine
|
Public Member Functions | |
run () | |
isFinished () | |
getResult () | |
cancelRun () | |
hasCancelledRun () | |
hasResult () | |
setResult ($result, $serialize=true) | |
setTaskId ($taskId) | |
getTaskId () | |
getFromThreadStore ($identifier) | |
saveToThreadStore ($identifier, $value) | |
onRun () | |
onCompletion (Server $server) | |
cleanObject () | |
Data Fields | |
$worker = null | |
Class used to run async tasks in other threads.
WARNING: Do not call PocketMine-MP API methods, or save objects from/on other Threads!!
getFromThreadStore | ( | $identifier | ) |
Gets something into the local thread store. You have to initialize this in some way from the task on run
string | $identifier |
getResult | ( | ) |
hasResult | ( | ) |
isFinished | ( | ) |
onCompletion | ( | Server | $server | ) |
|
abstract |
Actions to execute when run
saveToThreadStore | ( | $identifier, | |
$value | |||
) |
Saves something into the local thread store. This might get deleted at any moment.
string | $identifier | |
mixed | $value |
setResult | ( | $result, | |
$serialize = true |
|||
) |
mixed | $result | |
bool | $serialize |