Swoole\Coroutine::list()

Notice: ext-swoole is supported until v4.7.1, use ext-openswoole >= v4.7.1. Latest version: pecl install openswoole-4.9.1

Declaration

<?php
Swoole\Coroutine::list()

Parameters

Return

Description

Get all the coroutine IDs of current process.

Example

<?php
$list = Swoole\Coroutine::list();
foreach($list as $cid) {
    var_dump(Coroutine::getBackTrace($cid));
}