php8.5
Home/ Manual/ ev / evloop/ EvLoop::defaultLoop

EvLoop::defaultLoop

PHP function Edit on GitHub ✎

(PECL ev >= 0.2.0)

Returns or creates the default event loop

Description

EvLoop::defaultLoop(int $flags = Ev::FLAG_AUTO, mixed $data = NULL, float $io_interval = 0., float $timeout_interval = 0.): EvLoop

If the default event loop is not created, EvLoop::defaultLoop creates it with the specified parameters. Otherwise, it just returns the object representing previously created instance ignoring all the parameters.

Parameters

flags

One of the event loop flags

data

Custom data to associate with the loop.

io_collect_interval

See io_interval

timeout_collect_interval

See timeout_interval

Return Values

Returns EvLoop object on success.

See Also

  • EvLoop::__construct

Source: reference/ev/evloop/defaultloop.xml · from the official PHP manual (php/doc-en)