diff --git a/CHANGELOG.md b/CHANGELOG.md index 4577c03..e778b98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Docker support with multi-stage build (Ubuntu 24.04, libuv 1.49, curl 8.10) - PDO MySQL and MySQLi async support +- **TrueAsync API Extensions**: Enhanced async API with new object creation and coroutine grouping capabilities + - Added `ZEND_ASYNC_NEW_GROUP()` API for creating CoroutineGroup objects for managing multiple coroutines + - Added `ZEND_ASYNC_NEW_FUTURE_OBJ()` and `ZEND_ASYNC_NEW_CHANNEL_OBJ()` APIs for creating Zend objects from async primitives + - Extended `zend_async_task_t` structure with `run` method for thread pool task execution + - Enhanced `zend_async_scheduler_register()` function with new API function pointers - **Multiple Callbacks Per Event Support**: Complete redesign of waker trigger system to support multiple callbacks on a single event - Modified `zend_async_waker_trigger_s` structure to use flexible array member with dynamic capacity - Added `waker_trigger_create()` and `waker_trigger_add_callback()` helper functions for efficient memory management diff --git a/async_API.c b/async_API.c index 9c9a765..f877ca5 100644 --- a/async_API.c +++ b/async_API.c @@ -1104,6 +1104,31 @@ void async_await_futures( await_context->dtor(await_context); } +static zend_future_t* async_new_future_stub(bool thread_safe, size_t extra_size) +{ + return NULL; +} + +static zend_async_channel_t* async_new_channel_stub(size_t buffer_size, bool resizable, bool thread_safe, size_t extra_size) +{ + return NULL; +} + +static zend_object* async_new_future_obj_stub(zend_future_t *future) +{ + return NULL; +} + +static zend_object* async_new_channel_obj_stub(zend_async_channel_t *channel) +{ + return NULL; +} + +static zend_async_group_t* async_new_group_stub(size_t extra_size) +{ + return NULL; +} + void async_api_register(void) { zend_async_scheduler_register( @@ -1124,6 +1149,11 @@ void async_api_register(void) get_awaiting_info, async_get_class_ce, (zend_async_new_iterator_t)async_iterator_new, + async_new_future_stub, + async_new_channel_stub, + async_new_future_obj_stub, + async_new_channel_obj_stub, + async_new_group_stub, engine_shutdown ); } \ No newline at end of file