Skip to content

Commit 41bf8fc

Browse files
committed
#9: + Coroutine: Circular references between coroutines and finally handlers
1 parent 102c398 commit 41bf8fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/gc/013-gc_coroutine_circular_finally.phpt renamed to tests/coroutine/036-coroutine_gc_circular_finally.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
--TEST--
2-
GC 013: Circular references between coroutines and finally handlers
2+
Coroutine: Circular references between coroutines and finally handlers
33
--FILE--
44
<?php
55

66
use function Async\spawn;
77
use function Async\suspend;
88
use function Async\currentCoroutine;
9+
use function Async\await;
910

1011
echo "start\n";
1112

@@ -26,7 +27,7 @@ $circular_finally_coroutine = spawn(function() {
2627
return "circular_result";
2728
});
2829

29-
suspend();
30+
await($circular_finally_coroutine);
3031
$result = $circular_finally_coroutine->getResult();
3132
echo "circular result: $result\n";
3233

0 commit comments

Comments
 (0)