The EvLoop classIntroductionRepresents an event loop that is always distinct from the default loop . Unlike the default loop , it cannot handle EvChild watchers. Having threads we have to create a loop per thread, and use the default loop in the parent thread. The default event loop is initialized automatically by Ev . It is accessible via methods of the Ev class, or via EvLoop::defaultLoop method. Class synopsis
EvLoop
final
class EvLoop
{
/* Properties */
public
$data;
public
$backend;
public
$is_default_loop;
public
$iteration;
public
$pending;
public
$io_interval;
public
$timeout_interval;
public
$depth;
/* Methods */
public
__construct(
int $flags
= ?,mixed $data
= NULL
,float $io_interval
= 0.0
,float $timeout_interval
= 0.0
) public
int backend()
final
public
EvCheck check(
string
$callback
,
string
$data
= ?,
string
$priority
= ?)final
public
EvChild child(
string $pid
,string $trace
,string $callback
,string $data
= ?,string $priority
= ?) public
static
EvLoop defaultLoop(
int $flags
= Ev::FLAG_AUTO
,mixed $data
= NULL
,float $io_interval
= 0.
,float $timeout_interval
= 0.
) final
public
EvEmbed embed(
string $other
,string $callback
= ?,string $data
= ?,string $priority
= ?) final
public
EvFork fork(
callable
$callback
,
mixed
$data
= null
,
int
$priority
= 0
)final
public
EvIdle idle(
callable
$callback
,
mixed
$data
= null
,
int
$priority
= 0
)public
void invokePending()
final
public
EvIo io(
mixed $fd
,int $events
,callable $callback
,mixed $data
= null
,int $priority
= 0
) public
void loopFork()
public
float now()
public
void nowUpdate()
final
public
EvPeriodic periodic(
float $offset
,float $interval
,callable $callback
,mixed $data
= null
,int $priority
= 0
) final
public
EvPrepare prepare(
callable
$callback
,
mixed
$data
= null
,
int
$priority
= 0
)public
void resume()
public
void run(
int
$flags
= 0
)final
public
EvSignal signal(
int $signum
,callable $callback
,mixed $data
= null
,int $priority
= 0
) final
public
EvStat stat(
string $path
,float $interval
,callable $callback
,mixed $data
= null
,int $priority
= 0
) public
void stop(
int
$how
= ?)public
void suspend()
final
public
EvTimer timer(
float $after
,float $repeat
,callable $callback
,mixed $data
= null
,int $priority
= 0
) public
void verify()
}Properties
|