CommonThreadPartsTrait
Properties
$composerAutoloaderPath protected
php
protected ?string $composerAutoloaderPath$isKilled protected
php
protected bool $isKilledMethods
getClassLoaders()
php
public function getClassLoaders() : ?arraygetCrashInfo()
php
public function getCrashInfo() : ?\pocketmine\thread\ThreadCrashInfogetThreadName()
php
public function getThreadName() : stringonRun() protected
php
abstract protected function onRun() : voidRuns code on the thread.
onShutdown() protected
php
protected function onShutdown() : voidCalled by register_shutdown_function() when the thread shuts down. This may be because of a benign shutdown, or because of a fatal error. Use isKilled to determine which.
onUncaughtException() protected
php
protected function onUncaughtException(\Throwable $e) : voidCalled by set_exception_handler() when an uncaught exception is thrown.
quit()
php
public function quit() : voidStops the thread using the best way possible. Try to stop it yourself before calling this.
run()
php
final public function run() : voidsetClassLoaders()
php
public function setClassLoaders(?array $autoloaders = null) : voidstart()
php
public function start(int $options = \pmmp\thread\Thread::INHERIT_NONE) : bool