OpenSwoole\Coroutine::exists

Latest version: pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5

Declaration

<?php OpenSwoole\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 OpenSwoole\Coroutine::exists(OpenSwoole\Coroutine::getCid());
});
Last updated on September 1, 2022