Skip to content

v3.2.0

Choose a tag to compare

@Thavarshan Thavarshan released this 03 May 18:11
· 22 commits to main since this release

Added

  • New Concurrency Helper Functions:
    • all(array $promises): Run multiple promises concurrently and get an array of results.
    • race(array $promises): Get the result of the first promise that resolves.
    • any(array $promises): Get the result of the first promise that succeeds.

Changed

  • Improved Type Declarations and PHPDocs:
    • Added proper return type LoopInterface to getLoop() function.
    • Enhanced documentation with more detailed parameter and return type descriptions.
    • Included examples of various usage patterns in function documentation.

Fixed

  • Event Loop Management:
    • Removed premature getLoop()->stop() calls in the async() function.
    • Added resolution flag in await() to prevent running the event loop if a promise is already resolved.
    • Fixed potential issues with multiple concurrent promises by allowing the event loop to continue running when needed.