Swoole\Coroutine::exists

Latest version: pecl install openswoole-4.11.1

Declaration

<?php Swoole\Coroutine::exists(int $cid): bool

Parameters

cid

coroutine ID.

Return

exists

if success, it returns TRUE, otherwise it returns FALSE.

Description

Check if a coroutine is exists by coroutine ID.

Example

<?php
Co\run(function () {
  echo Swoole\Coroutine::exists(Swoole\Coroutine::getCid());
});
Last updated on March 31, 2022