Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\Event::dispatch()\:\ void
Waits for I/O events only once. Compared with Event::wait
, it calls epoll_wait
only once, allowing the developer to control when to wait. The purpose of this function is to allow frameworks and low level libraries to maintain control of the event loop, as Event::wait
only lets OpenSwoole control everything and not other processes.
<?php
while(true) {
OpenSwoole\Event::dispatch();
}