v0.6.2
What's Changed
Added
- Non-blocking
flock():flock()no longer blocks the event loop. The lock operation is offloaded to the libuv thread pool viazend_async_task_t, allowing other coroutines to continue executing while waiting for a file lock. zend_async_task_new()API: New factory function for creating thread pool tasks, registered through the reactor like timer and IO events. Replaces manualpecalloc+ field initialization.
Fixed
await_*()deadlock with already-completed awaitables: When a coroutine or Future passed toawait_all(),await_any_or_fail(), or otherawait_*()functions had already completed, it was skipped entirely (ZEND_ASYNC_EVENT_IS_CLOSED→continue), butresolved_countwas never incremented. Sincetotalstill counted the skipped awaitable,resolved_countcould never reachtotal, causing a deadlock. Fixed by usingZEND_ASYNC_EVENT_REPLAYto synchronously replay the stored result/exception through the normal callback path, correctly updating all counters. Additionally, when replay satisfies the waiting condition early (e.g.await_any_or_failneeds only one result), the loop now breaks immediately instead of subscribing to remaining awaitables and suspending unnecessarily.
Full Changelog: v0.6.1...v0.6.2