In Swoole 4.4.6 the coroutine methods related to the filesystem, name resolution, and few others will be moved from Swoole\Coroutine to Swoole\Coroutine\System. The recommended way will be to access Co\System::sleep() instead of Co::sleep().
As a side note – here is a tool for dumping all Swoole classes. It is useful as the documentation is sometimes lagging.
P.S. The Coroutine\System class is available also in 4.4.5 but has most of its methods set as a dynamic which needs to be corrected to static.
P.P.S. 18.09.2019 – Swoole 4.4.6 is out and the above bug is corrected. Coroutine\System is to be used from now on.
Veselin Kenashkov
Latest posts by Veselin Kenashkov (see all)
- CentOS roadmap changes already made impact - December 12, 2020
- Docker image with Apache 2.2 and PHP 5.3 - September 26, 2020
- Emulation and virtualization guides - September 24, 2020