Skip to content

Commit 29f050b

Browse files
committed
Enhance coroutine management: add filename and line tracking for new coroutines
1 parent 63e69a0 commit 29f050b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scheduler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ bool async_scheduler_coroutine_enqueue(zend_coroutine_t *coroutine)
10281028
// Behavior for a new coroutine
10291029
// see: async_API.c spawn(zend_async_scope_t *scope, zend_object *scope_provider, int32_t priority)
10301030
if (false == ZEND_COROUTINE_IS_STARTED(coroutine)
1031-
&& zend_hash_index_find(&ASYNC_G(coroutines), ((async_coroutine_t *)coroutine)->std.handle) != NULL) {
1031+
&& zend_hash_index_find(&ASYNC_G(coroutines), ((async_coroutine_t *)coroutine)->std.handle) == NULL) {
10321032
// save the filename and line number where the coroutine was created
10331033
zend_apply_current_filename_and_line(&coroutine->filename, &coroutine->lineno);
10341034

0 commit comments

Comments
 (0)