12345678910111213141516171819202122232425262728293031 |
- <?php
- declare(strict_types=1);
- namespace Co;
- use Swoole\Coroutine;
- if (SWOOLE_USE_SHORTNAME) {
- function run(callable $fn, ...$args)
- {
- return \Swoole\Coroutine\run($fn, ...$args);
- }
- function go(callable $fn, ...$args)
- {
- return Coroutine::create($fn, ...$args);
- }
- function defer(callable $fn)
- {
- Coroutine::defer($fn);
- }
- }
|