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::wait()\:\ void
Waits for I/O events to complete. It calls epoll_wait
and maintains the event loop and waits for it to fully complete before moving on, allowing you to wait for the tasks on the event loop to finish before continuing.
<?php
OpenSwoole\Timer::tick(1000, function () {
echo "hello";
});
OpenSwoole\Event::wait();
echo " world\n";