Swoole\Event->wait

Declaration

<?php
Swoole\Event->wait()

Parameters

Return

success

if success, it returns TRUE, otherwise it returns FALSE.

Description

Waiting for I/O events. It calls epoll_wait and maintain the event loop.

Example

<?php
Swoole\Timer::tick(1000, function () {
    echo "hello\n";
});

Swoole\Event::wait();