Skip to content

Commit 739364f

Browse files
committed
* fix build issue for Scope
1 parent 9990aa8 commit 739364f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Zend/zend_async_API.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,12 @@ struct _zend_async_scope_s {
655655
zend_async_before_coroutine_enqueue_t before_coroutine_enqueue;
656656
zend_async_after_coroutine_enqueue_t after_coroutine_enqueue;
657657

658+
/**
659+
* The method determines the moment when the Scope can be destructed.
660+
* It checks the conditions and, if necessary, calls the dispose method.
661+
*/
662+
void (*try_to_dispose)(zend_async_scope_t *scope);
663+
658664
/**
659665
* The method handles an exception delivered to the Scope.
660666
* Its result may either be the cancellation of the Scope or the suppression of the exception.
@@ -726,7 +732,7 @@ zend_async_scope_remove_child(zend_async_scope_t *parent_scope, zend_async_scope
726732

727733
// Try to dispose the parent scope if it is empty
728734
if (parent_scope->scopes.length == 0) {
729-
parent_scope->dispose(parent_scope);
735+
parent_scope->try_to_dispose(parent_scope);
730736
}
731737

732738
return;

0 commit comments

Comments
 (0)