pocketmine\scheduler\AsyncPool::__construct PHP Method

__construct() public method

public __construct ( Server $server, $size )
$server pocketmine\Server
    public function __construct(Server $server, $size)
    {
        $this->server = $server;
        $this->size = (int) $size;
        for ($i = 0; $i < $this->size; ++$i) {
            $this->workerUsage[$i] = 0;
            $this->workers[$i] = new AsyncWorker($this->server->getLogger(), $i + 1);
            $this->workers[$i]->setClassLoader($this->server->getLoader());
            $this->workers[$i]->start();
        }
    }