Skip to content

Commit d4da78c

Browse files
committed
#53: * fix memory leak by resumed_coroutines logic
1 parent e499a4d commit d4da78c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scheduler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,11 +1302,11 @@ ZEND_STACK_ALIGNED void fiber_entry(zend_fiber_transfer *transfer)
13021302

13031303
ZEND_ASYNC_SCHEDULER_CONTEXT = true;
13041304

1305+
ZEND_ASSERT(circular_buffer_is_not_empty(resumed_coroutines) == 0 && "resumed_coroutines should be 0");
1306+
13051307
execute_microtasks();
13061308
TRY_HANDLE_EXCEPTION();
13071309

1308-
ZEND_ASSERT(circular_buffer_is_not_empty(resumed_coroutines) == 0 && "resumed_coroutines should be 0");
1309-
13101310
has_next_coroutine = circular_buffer_count(coroutine_queue) > 0;
13111311
has_handles = ZEND_ASYNC_REACTOR_EXECUTE(has_next_coroutine);
13121312

0 commit comments

Comments
 (0)