Swoole\Event->defer

Declaration

<?php
Swoole\Event->defer(callable $callback)

Parameters

callback

Defer a function to the next loop

Return

success

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

Description

Defer a function to the next Loop.

Example

<?php
Swoole\Event::defer(function(){
    echo "After EventLoop\n";
});