mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 04:37:46 +08:00
Use Coroutine::create() instead of short name method
This commit is contained in:
parent
6b19091737
commit
0e25af3d3e
@ -12,6 +12,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Hyperf\Utils\Coroutine;
|
namespace Hyperf\Utils\Coroutine;
|
||||||
|
|
||||||
|
use Hyperf\Utils\Coroutine;
|
||||||
use Swoole\Coroutine\Channel;
|
use Swoole\Coroutine\Channel;
|
||||||
|
|
||||||
class Concurrent
|
class Concurrent
|
||||||
@ -45,7 +46,7 @@ class Concurrent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
go(function () use ($callable) {
|
Coroutine::create(function () use ($callable) {
|
||||||
$callable();
|
$callable();
|
||||||
$this->channel->pop($this->timeout);
|
$this->channel->pop($this->timeout);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user