« Swoole\Event::cycle
Swoole\Event::del »

Swoole\Event::defer

(PECL swoole >= 1.9.0)

Swoole\Event::defer — Execute a function at the start of the next event loop

説明

public static function Swoole\Event::defer(callable $callback_function): void

Schedules a function to run at the start of the next event loop iteration.

パラメータ

callback_function

Callback function to execute (no parameters allowed; use use for closure variables).

戻り値

No return value.

例

例1 Swoole\Event::defer() example

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

関連キーワード:
Swoole   Event   defer   start   next   event   loop   Execute   callback   cycle   swoole   static   callable   Schedules   iteration   Callback   execute   parameters   allowed   closure   variables   No return   example   After   EventLoop
関連する関数・ページ:
swoole-event.cycle   swoole-event.wait   class.swoole-event   swoole-event.dispatch   swoole-event.isset   swoole-event.add