Swoole\Coroutine::getCid ()

Declaration

<?php
Swoole\Coroutine::getCid ()

Parameters

Return

cid

Current coroutine ID.

Description

Get the current Coroutine ID.

Example

<?php
Co\run(function () {
    echo Swoole\Coroutine::getCid();
});