@@ -159,6 +159,7 @@ typedef zend_coroutine_t * (*zend_async_new_coroutine_t)(zend_async_scope_t *sco
159159typedef zend_async_scope_t * (* zend_async_new_scope_t )(zend_async_scope_t * parent_scope );
160160typedef zend_coroutine_t * (* zend_async_spawn_t )(zend_async_scope_t * scope , zend_object * scope_provider );
161161typedef void (* zend_async_suspend_t )(bool from_main );
162+ typedef void (* zend_async_enqueue_coroutine_t )(zend_coroutine_t * coroutine );
162163typedef void (* zend_async_resume_t )(zend_coroutine_t * coroutine , zend_object * error , const bool transfer_error );
163164typedef void (* zend_async_cancel_t )(zend_coroutine_t * coroutine , zend_object * error , const bool transfer_error , const bool is_safely );
164165typedef void (* zend_async_shutdown_t )(void );
@@ -866,6 +867,7 @@ ZEND_API extern zend_async_spawn_t zend_async_spawn_fn;
866867ZEND_API extern zend_async_new_coroutine_t zend_async_new_coroutine_fn ;
867868ZEND_API extern zend_async_new_scope_t zend_async_new_scope_fn ;
868869ZEND_API extern zend_async_suspend_t zend_async_suspend_fn ;
870+ ZEND_API extern zend_async_enqueue_coroutine_t zend_async_enqueue_coroutine_fn ;
869871ZEND_API extern zend_async_resume_t zend_async_resume_fn ;
870872ZEND_API extern zend_async_cancel_t zend_async_cancel_fn ;
871873ZEND_API extern zend_async_shutdown_t zend_async_shutdown_fn ;
@@ -913,6 +915,7 @@ ZEND_API void zend_async_scheduler_register(
913915 zend_async_new_context_t new_context_fn ,
914916 zend_async_spawn_t spawn_fn ,
915917 zend_async_suspend_t suspend_fn ,
918+ zend_async_enqueue_coroutine_t enqueue_coroutine_fn ,
916919 zend_async_resume_t resume_fn ,
917920 zend_async_cancel_t cancel_fn ,
918921 zend_async_shutdown_t shutdown_fn ,
@@ -986,6 +989,7 @@ END_EXTERN_C()
986989#define ZEND_ASYNC_NEW_SCOPE (parent ) zend_async_new_scope_fn(parent)
987990#define ZEND_ASYNC_SUSPEND () zend_async_suspend_fn(false)
988991#define ZEND_ASYNC_RUN_SCHEDULER_AFTER_MAIN () zend_async_suspend_fn(true)
992+ #define ZEND_ASYNC_ENQUEUE_COROUTINE (coroutine ) zend_async_enqueue_coroutine_fn(coroutine)
989993#define ZEND_ASYNC_RESUME (coroutine ) zend_async_resume_fn(coroutine, NULL, false)
990994#define ZEND_ASYNC_RESUME_WITH_ERROR (coroutine , error , transfer_error ) zend_async_resume_fn(coroutine, error, transfer_error)
991995#define ZEND_ASYNC_CANCEL (coroutine , error , transfer_error ) zend_async_cancel_fn(coroutine, error, transfer_error, false)
0 commit comments