Swoole\Coroutine::disableScheduler ()

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Coroutine::disableScheduler ()

Parameters

Return

cid

Current coroutine ID.

Description

Disable preemptive scheduler.

It is the same as ini_set("swoole.enable_preemptive_scheduler", "0");.

Example

<?php
Swoole\Coroutine::disableScheduler();
Co\run(function () {
    //
});
Last updated on August 31, 2022