public function reloadConfig(): Promise
    {
        if ($this->pendingConfig) {
            return $this->pendingConfig;
        }

        $promise = call(function () {
            $this->config = yield $this->configLoader->loadConfig();
        });

        $this->pendingConfig = $promise;

        $promise->onResolve(function () {
            $this->pendingConfig = null;
        });

        return $promise;
    }
public function reloadConfig(): Promise
    {
        if ($this->pendingConfig) {
            return $this->pendingConfig;
        }

        $promise = call(function () {
            $this->config = yield $this->configLoader->loadConfig();
        });

        $this->pendingConfig = $promise;

        $promise->onResolve(function () {
            $this->pendingConfig = null;
        });

        return $promise;
    }
public function reloadConfig ( ) : Promise { if ( $ this -> pendingConfig ) { return $ this -> pendingConfig ; } $ promise = call ( function ( ) { $ this -> config = yield $ this -> configLoader -> loadConfig ( ) ; } ) ; $ this -> pendingConfig = $ promise ; $ promise -> onResolve ( function ( ) { $ this -> pendingConfig = null ; } ) ; return $ promise ; }
Reloads the configuration in the background.

Once it's finished, the configuration will be used for new requests.

@return Promise
Reloads the configuration in the background .