|
1 | 1 | # Release Notes
|
2 | 2 |
|
3 |
| -## [Unreleased](https://github.com/Thavarshan/matrix/compare/v2.0.0...HEAD) |
| 3 | +## [Unreleased](https://github.com/Thavarshan/matrix/compare/v3.0.0...HEAD) |
| 4 | + |
| 5 | +## [v3.0.0](https://github.com/Thavarshan/matrix/compare/v2.0.0...v3.0.0) - 2024-12-16 |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- **`async()` Helper**: Introduce a global `async()` function that starts an asynchronous task in a child process and returns an `AsyncPromise`, simplifying async task initialization. |
| 10 | +- **`AsyncProcessManager`**: New class responsible for forking child processes, running callables, and returning results via ReactPHP promises. Enables true parallel execution of tasks. |
| 11 | +- **`AsyncPromise`**: A promise-like wrapper around ReactPHP promises, providing a JavaScript-inspired `.then()` and `.catch()` API for handling asynchronous results and errors. |
| 12 | +- **Non-blocking Event Loop Integration**: Leverages ReactPHP’s event loop to ensure the parent process never blocks, improving concurrency and throughput. |
| 13 | + |
| 14 | +### Changed |
| 15 | + |
| 16 | +- **Concurrency Model**: Replaced the previous Fiber-based approach with a `pcntl_fork()` and event-loop-driven model, allowing tasks to run in fully parallel child processes rather than cooperatively within a single process. |
| 17 | +- **API Simplification**: Removed complex Fiber management and lifecycle control in favor of a simpler, promise-based API that closely resembles JavaScript promises. |
| 18 | +- **Error Handling**: Exceptions are now serialized in child processes and rethrown in the parent, streamlining error handling and eliminating Fiber-based error propagation. |
| 19 | +- **User Experience**: The entire asynchronous execution flow now relies on `async()` and `AsyncPromise` for a more intuitive and familiar development experience, reducing the mental overhead of previous Fiber lifecycle methods. |
| 20 | + |
| 21 | +### Fixed |
| 22 | + |
| 23 | +- **Blocking Behavior**: Previous code using Fibers sometimes led to partial blocking or complicated flow control. The new process-based approach ensures truly non-blocking behavior, improving application responsiveness. |
| 24 | +- **Complex Error Traces**: With Fibers, debugging could be cumbersome. Now, error messages, file, line, and stack traces are cleanly serialized by the child and rethrown in the parent, simplifying debugging. |
| 25 | +- **Limited Concurrency**: The old Fiber system provided concurrency but not true parallelism. By using separate child processes, we’ve fixed previous limitations and enabled multiple tasks to genuinely run at the same time. |
4 | 26 |
|
5 | 27 | ## [v2.0.0](https://github.com/Thavarshan/matrix/compare/v1.0.1...v2.0.0) - 2024-12-06
|
6 | 28 |
|
|
0 commit comments