Skip to content

Commit 223f0f9

Browse files
authored
Add Hyperf\Coroutine\Coroutine::list() (#7286)
1 parent 19c16ec commit 223f0f9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=8.1",
2020
"hyperf/context": "~3.1.0",
2121
"hyperf/contract": "~3.1.0",
22-
"hyperf/engine": "^2.0"
22+
"hyperf/engine": "^2.13.0"
2323
},
2424
"autoload": {
2525
"psr-4": {

src/Coroutine.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ public static function exists(int $id): bool
119119
return Co::exists($id);
120120
}
121121

122+
/**
123+
* @return iterable<int>
124+
*/
125+
public static function list(): iterable
126+
{
127+
return Co::list();
128+
}
129+
122130
private static function printLog(Throwable $throwable): void
123131
{
124132
if (ApplicationContext::hasContainer()) {

0 commit comments

Comments
 (0)