(PECL ev >= 0.2.0)
Represents 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.
$flags
= ?,$data
= NULL
,$io_interval
= 0.0
,$timeout_interval
= 0.0
$pid
,$trace
,$callback
,$data
= ?,$priority
= ?$flags
= Ev::FLAG_AUTO
,$data
= NULL
,$io_interval
= 0.
,$timeout_interval
= 0.
$other
,$callback
= ?,$data
= ?,$priority
= ?$fd
,$events
,$callback
,$data
= null
,$priority
= 0
$offset
,$interval
,$callback
,$data
= null
,$priority
= 0
$signum
,$callback
,$data
= null
,$priority
= 0
$path
,$interval
,$callback
,$data
= null
,$priority
= 0
true if it is the default event loop.
0
indicates that there are no watchers pending.
sleep()
call into most loop iterations. The sleep time ensures that
libev
will not poll for
EvIo
events more often than once per this interval, on average. Many
programs can usually benefit by setting the
io_interval
to a value near
0.1,
which is often enough for interactive servers(not for games). It
usually doesn't make much sense to set it to a lower value than
0.01,
as this approaches the timing granularity of most systems.
See also
» FUNCTIONS
CONTROLLING EVENT LOOPS.