PHP 8.6.0 Beta 1 is available for testing

Swoole\Event::dispatch

(No version information available, might only be in Git)

Swoole\Event::dispatchPerform a single event loop iteration

说明

public static function Swoole\Event::dispatch(): void

The purpose of this function is to maintain compatibility with some frameworks. When a framework internally manages its own reactor loop, using Event::wait would allow Swoole's underlying layer to retain control, preventing the framework from taking over execution.

返回值

No return value.

示例

示例 #1 Manual event loop control

<?php
while (true) {
    Swoole\Event::dispatch();
}

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top