File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2034,8 +2034,10 @@ static void zend_gc_collect_cycles_coroutine(void)
20342034 }
20352035
20362036 if (GC_G (microtask ) != NULL ) {
2037- GC_G (microtask )-> is_cancelled = true;
2038- ZEND_ASYNC_MICROTASK_RELEASE (GC_G (microtask ));
2037+ zend_async_microtask_t * microtask = GC_G (microtask );
2038+ GC_G (microtask ) = NULL ;
2039+ microtask -> is_cancelled = true;
2040+ ZEND_ASYNC_MICROTASK_RELEASE (microtask );
20392041 }
20402042}
20412043
@@ -2066,8 +2068,10 @@ static void coroutine_dispose(zend_coroutine_t *coroutine)
20662068 GC_G (dtor_scope ) = NULL ;
20672069
20682070 if (GC_G (microtask ) != NULL ) {
2069- GC_G (microtask )-> is_cancelled = true;
2070- zend_gc_collect_cycles_microtask_dtor (GC_G (microtask ));
2071+ zend_async_microtask_t * microtask = GC_G (microtask );
2072+ GC_G (microtask ) = NULL ;
2073+ microtask -> is_cancelled = true;
2074+ ZEND_ASYNC_MICROTASK_RELEASE (microtask );
20712075 }
20722076
20732077 if (GC_G (gc_stack ) != NULL ) {
You can’t perform that action at this time.
0 commit comments