-
Notifications
You must be signed in to change notification settings - Fork 2
Fiber support #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fiber support #71
Conversation
- 016: Nested fibers in separate coroutines with symmetric switching - 017: Multiple suspend/resume in different coroutines - 018: GC with circular references between fibers and coroutines Tests verify that fibers in different coroutines are independent and properly delegate GC to coroutine handlers.
…& ZEND_ASYNC_ACTIVE_EVENT_COUNT > 0;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive fiber support to the async coroutine system, enabling fibers to work seamlessly with the existing async scheduler. The implementation includes deadlock detection for yielded fiber coroutines, scope validation, and updates to the libuv reactor logic.
Key Changes:
- Added deadlock resolution logic for fiber coroutines in YIELD state
- Implemented scope validation check before coroutine enqueue
- Modified libuv reactor return logic to handle fiber scenarios
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| scheduler.c | Added fiber-aware deadlock detection and scope validation for coroutine enqueuing |
| libuv_reactor.c | Modified reactor execute return logic for fiber integration |
| coroutine.h | Added zend_fibers.h header include |
| tests/fiber/*.phpt | 28 comprehensive test files covering fiber basics, edge cases, and cancellation |
| tests/edge_cases/*.phpt | 3 test files for fiber-spawn interaction scenarios and GC behavior |
| tests/stream/032-stream_select_null_timeout.phpt | Test for stream_select with null timeout in fiber context |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ccurs in the main coroutine while the GC is running.
No description provided.