parallel\Runtime::__construct

(0.8.0)

parallel\Runtime::__constructRuntime Construction

说明

public parallel\Runtime::__construct ( void )

Shall construct a new runtime without bootstrapping or configuration.

public parallel\Runtime::__construct ( string $bootstrap )

Shall construct a bootstrapped runtime, it is recommended to use a bootstrap, and it should generally be an autoloader.

public parallel\Runtime::__construct ( array $configuration )

Shall construct a new runtime without bootstraping and configure it using the given configuration. It may be sensible to pass the result of a call to \ini_get_all() as configuration.

public parallel\Runtime::__construct ( string $bootstrap , array $configuration )

Shall construct a new bootstrapped runtime and configure it using the given configuration. It may be sensible to pass the result of a call to \ini_get_all() as configuration.

参数

bootstrap

The location of a bootstrap file, generally the location of an autoloader.

configuration

INI configuration options

Exceptions

Warning

Shall throw \parallel\Exception if arguments are invalid

Warning

Shall throw \parallel\Exception if bootstrapping failed

Warning

Shall throw \parallel\Exception if the thread could not be created