Skip to content

Commit f99433c

Browse files
committed
Merge branch 'true-async-api' into true-async-api-stable
2 parents daba869 + e27f9b6 commit f99433c

18 files changed

+2754
-146
lines changed

Zend/zend.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,11 @@ ZEND_API void zend_activate(void) /* {{{ */
13351335
void zend_call_destructors(void) /* {{{ */
13361336
{
13371337
zend_try {
1338+
#ifdef PHP_ASYNC_API
1339+
shutdown_destructors_async();
1340+
#else
13381341
shutdown_destructors();
1342+
#endif
13391343
} zend_end_try();
13401344
}
13411345
/* }}} */
@@ -1352,6 +1356,12 @@ ZEND_API void zend_deactivate(void) /* {{{ */
13521356
/* shutdown_executor() takes care of its own bailout handling */
13531357
shutdown_executor();
13541358

1359+
#ifdef PHP_ASYNC_API
1360+
// The execution of the True Async API should end here,
1361+
// after the GC has been run.
1362+
ZEND_ASYNC_ENGINE_SHUTDOWN();
1363+
#endif
1364+
13551365
zend_try {
13561366
zend_ini_deactivate();
13571367
} zend_end_try();

0 commit comments

Comments
 (0)