|
Genisys
Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
|
Public Member Functions | |
| getStacked () | |
| isShutdown () | |
| collector (Collectable $collectable) | |
| shutdown () | |
| stack (Collectable &$work) | |
| unstack () | |
| collect (callable $function) | |
Public Member Functions inherited from Thread | |
| getCreatorId () | |
| getThreadId () | |
| isJoined () | |
| isStarted () | |
| join () | |
| start (int $options=PTHREADS_INHERIT_ALL) | |
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 () | |
Additional Inherited Members | |
Static Public Member Functions inherited from Thread | |
| static | getCurrentThread () |
| static | getCurrentThreadId () |
Static Public Member Functions inherited from Threaded | |
| static | extend ($obj) |
Worker Threads have a persistent context, as such should be used over Threads in most cases.
When a Worker is started, the run method will be executed, but the Thread will not leave until one of the following conditions are met:
| collect | ( | callable | $function | ) |
Collects finished objects
| callable | $function | void |
| getStacked | ( | ) |
Returns the number of threaded tasks waiting to be executed by the referenced Worker
| isShutdown | ( | ) |
Tell if the referenced Worker has been shutdown
| shutdown | ( | ) |
Shuts down the Worker after executing all the threaded tasks previously stacked
| stack | ( | Collectable & | $work | ) |
Appends the referenced object to the stack of the referenced Worker
| Collectable | $work | Collectable object to be executed by the referenced Worker |
| unstack | ( | ) |
Removes the first item from the stack