Swoole\Event::exit

Latest version: pecl install openswoole-4.11.1

Declaration

<?php Swoole\Event::exit()\:\ void

Parameters

none

Return

void

Description

Exit the Event Loop, only available at client side, meaning, you can exit and stop the event loop you are currently in but not the main server event loop.

Example

<?php

Swoole\Timer::tick(1000, function() {

    echo "tick\n";
    Swoole\Event::exit();

});

Swoole\Event::wait();
Last updated on March 31, 2022