Skip to content

Commit 92d25a9

Browse files
committed
* This is worth a comment to explain that this is called to handle any task created by shutdown functions or destructors, and to handle destructors that didn't return yet.
Possibly this should be executed between php_call_shutdown_functions() and zend_call_destructors() as well, so that destructors are not called before tasks created by php_call_shutdown_functions() are executed.
1 parent a425e7e commit 92d25a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,8 @@ void php_request_shutdown(void *dummy)
19811981
zend_call_destructors();
19821982
} zend_end_try();
19831983

1984+
// Before PHP shuts down completely,
1985+
// control is passed to the coroutines one last time (if any remain).
19841986
ZEND_ASYNC_RUN_SCHEDULER_AFTER_MAIN();
19851987

19861988
/* 3. Flush all output buffers */

0 commit comments

Comments
 (0)