|
Genisys
Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
|
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 () | |
Public Member Functions inherited from Threaded | |
| 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 Public Member Functions inherited from Threaded | |
| 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!!
| 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 | ( | ) |
| isGarbage | ( | ) |
Implements Collectable.
| 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 |