Releases: EdmondDantes/php-true-async-rfc
This repository is being moved to a separate project
This repository is being moved to a separate project: https://github.com/true-async/php-true-async-rfc
RC2
Summary
Changes
Documentation Improvements
- Clarified the usage of the
spawn
andawait
keywords in PHP, including naming restrictions and placement rules. - Expanded documentation on coroutine management:
- Added examples for binding coroutines to PHP objects.
- Clarified task racing scenarios.
- Provided recommendations for the safe usage of coroutines in web applications.
Functionality Enhancements
- Updated diagrams and requirement mappings:
- Refined terminology and relationships for task cancellation and error handling.
- Added examples for protecting critical sections.
Bug Fixes
- Clarified risks associated with waiting on child coroutines within a
Scope
. - Fixed issues in examples related to
Scope
usage and error handling.
RC 1
Changes
Documentation Improvements:
- Clarified the usage of the
spawn
andawait
keywords in PHP, including naming restrictions and placement rules. - Expanded documentation on coroutine management:
- Added examples for binding coroutines to PHP objects.
- Clarified task racing scenarios.
- Provided recommendations for the safe usage of coroutines in web applications.
Functionality Enhancements:
- Updated diagrams and requirement mappings:
- Refined terminology and relationships for task cancellation and error handling.
- Added examples for protecting critical sections.
Bug Fixes:
- Clarified risks associated with waiting on child coroutines within a Scope.
- Fixed issues in examples related to Scope usage and error handling.
TaskGroup pattern
The TaskGroup
pattern has significantly simplified the RFC logic on one hand, while on the other hand preserving the advantages of separating explicit and implicit tasks, as was done in the previous version of the RFC.
TaskGroup
provides an API similar to Python’s counterpart, simplifying the logic of Scope
and giving developers the flexibility to combine both approaches when needed.
The RFC has also adopted a global philosophy of being Cancellable by design.
Fix changes
Changes:
- Added sections with diagrams and their descriptions.
- Changed descriptions of some components, such as Scheduler and Reactor.
- Added a new section "Spawn with child expression" with code examples.
- Updated code examples for various expressions, such as `spawn` and `suspend`.
- Added new diagram files: decision-tree.puml and feature-to-requirement.puml, as well as their corresponding SVG versions.
These changes include improvements to the documentation, addition of new features, and clarification of existing descriptions and examples.
0.9.0 - beta version
Changes from Version 0.8.0 to Main Branch
basic.md
- Formatting: Removed extra spaces in code examples and descriptions
- Code Examples:
- Updated examples for launching functions in non-blocking mode
- Improved examples for waiting for coroutine results and cancellation
- Added new examples for structured concurrency and error handling
New File: colored_functions.md
- Content:
- Detailed explanation of how colored functions help implement structured concurrency
- Syntax and usage examples for colored functions in PHP
- Comparison with other languages' concurrency models
Function Renaming
withoutCancellation
function renamed toprotect
Functionality Enhancements
- Coroutine Scope Management:
- Added
awaitAllIgnoringErrors
method to handle errors more gracefully
- Added
- Error Handling:
- Improved handling of exceptions within coroutines and scopes
- Added more detailed examples and explanations for error handling
Detailed Code Changes
-
Structured Concurrency:
- Enhanced examples for
async $scope
blocks - Improved explanations for coroutine scopes and structured concurrency patterns
- Enhanced examples for
-
Error Handling:
- Added detailed examples for handling exceptions within coroutines and scopes
- Improved error mitigation strategies
-
Await Expressions:
- Improved examples for using
await
with cancellation tokens
- Improved examples for using
Preliminary version
CHANGE LOG
- Adding an overview
- A full set of new syntactic constructs
await until
constructasync $scope
block- Zombie coroutines
- Additional Scope API for task awaiting
- More code examples