Skip to content

CommonThreadPartsTrait ​

trait · pocketmine\thread\CommonThreadPartsTrait · source

Properties ​

$composerAutoloaderPath protected ​

php
protected ?string $composerAutoloaderPath

$isKilled protected ​

php
protected bool $isKilled

Methods ​

getClassLoaders() ​

php
public function getClassLoaders() : ?array

getCrashInfo() ​

php
public function getCrashInfo() : ?\pocketmine\thread\ThreadCrashInfo

getThreadName() ​

php
public function getThreadName() : string

onRun() protected ​

php
abstract protected function onRun() : void

Runs code on the thread.

onShutdown() protected ​

php
protected function onShutdown() : void

Called 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) : void

Called by set_exception_handler() when an uncaught exception is thrown.

quit() ​

php
public function quit() : void

Stops the thread using the best way possible. Try to stop it yourself before calling this.

run() ​

php
final public function run() : void

setClassLoaders() ​

php
public function setClassLoaders(?array $autoloaders = null) : void

start() ​

php
public function start(int $options = \pmmp\thread\Thread::INHERIT_NONE) : bool

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.