GenisysPro
for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
|
Public Member Functions | |
isGarbage () | |
setGarbage () | |
isFinished () | |
run () | |
isCrashed () | |
getResult () | |
cancelRun () | |
hasCancelledRun () | |
hasResult () | |
setResult ($result, $serialize=true) | |
setTaskId ($taskId) | |
getTaskId () | |
getFromThreadStore ($identifier) | |
saveToThreadStore ($identifier, $value) | |
onRun () | |
onCompletion (Server $server) | |
cleanObject () | |
![]() | |
chunk ($size, bool $preserve=false) | |
count () | |
isRunning () | |
isTerminated () | |
merge ($from, $overwrite=true) | |
notify () | |
notifyOne () | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetExists ($offset) | |
offsetUnset ($offset) | |
pop () | |
run () | |
shift () | |
synchronized (\Closure $function, $args=null) | |
wait ($timeout) | |
getRefCount () | |
addRef () | |
delRef () | |
isGarbage () | |
Data Fields | |
$worker = null | |
Additional Inherited Members | |
![]() | |
static | extend ($obj) |
Class used to run async tasks in other threads.
An AsyncTask does not have its own thread. It is queued into an AsyncPool and executed if there is an async worker with no AsyncTask running. Therefore, an AsyncTask SHOULD NOT execute for more than a few seconds. For tasks that run for a long time or infinitely, start another pocketmine\Threadinstead.WARNING:DonotcallPocketMine-MPAPImethods,orsaveobjects(andarrayscontainingobjects)from/onotherThreads!!
cancelRun | ( | ) |
cleanObject | ( | ) |
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 | ( | ) |
hasCancelledRun | ( | ) |
isGarbage | ( | ) |
onCompletion | ( | Server | $server | ) |
|
abstract |
Actions to execute when run
run | ( | ) |
saveToThreadStore | ( | $identifier, | |
$value | |||
) |
Saves something into the local thread store. This might get deleted at any moment.
string | $identifier | |
mixed | $value |
setGarbage | ( | ) |
setResult | ( | $result, | |
$serialize = true |
|||
) |
$worker = null |