pocketmine\Worker::start PHP Method

start() public method

public start ( integer $options = PTHREADS_INHERIT_ALL )
$options integer
    public function start(int $options = PTHREADS_INHERIT_ALL)
    {
        ThreadManager::getInstance()->add($this);
        if (!$this->isRunning() and !$this->isJoined() and !$this->isTerminated()) {
            if ($this->getClassLoader() === null) {
                $this->setClassLoader();
            }
            return parent::start($options);
        }
        return false;
    }

Usage Example

Ejemplo n.º 1
0
 public function start($options = PTHREADS_INHERIT_NONE)
 {
     parent::start(PTHREADS_INHERIT_CONSTANTS | PTHREADS_INHERIT_FUNCTIONS);
 }