Repository navigation
Add Fiber-native concurrent task groups - #397
Open
abdulmajidcse wants to merge 1 commit into
Open
abdulmajidcse wants to merge 1 commit into
abdulmajidcse wants to merge 1 commit into
Conversation
techmahedy
reviewed
Nov 1, 2026
techmahedy
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR
The TaskGroup / Task implementation is clean and well tested. I verified the acceptance criteria from #357 locally: named failures, sibling cancellation, and deterministic deadlines all behave as described.
Decision: deferred to Doppar 5.x
We won't merge this into 4.x, and we'll revisit it for 5.x.
Why
- It is cooperative concurrency, not parallelism. Tasks only overlap while waiting on non-blocking I/O. They run on a single thread.
- The framework's I/O blocks. The DB layer, HTTP client and filesystem calls are blocking, so a group of normal framework calls runs sequentially with no speedup.
- Real concurrency is a large change. It needs some combination of:
- async drivers (HTTP, MySQL, Redis)
- promise support in
Task::await() - a process-backed runner for blocking or CPU-bound work
- changes to the DB layer
- Public API stability. A new public API in 4.x is hard to change later if the 5.x design differs.
Plan for 5.x
Design the whole concurrency model together: the runner (Fibers and/or processes), the async I/O story, and the TaskGroup API on top. This PR is a good starting point for that design.
If you continue this work for 5.x
Please address these first:
- Non-Fiber call while the loop is running. It re-enters
loop->run(). In testing, a timer callback ran twice, and the nested run stops the outer loop. - Any Fiber is treated as "the loop is running". If the loop is not running, a group called from a user Fiber suspends forever and its tasks never start.
Both need a clear error or an explicit option, plus tests.
#357 stays open and moves to the 5.x milestone. Thank you for the contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Description
Adds an opt-in, Fiber-native
TaskGroupAPI for running named non-blocking operations on the configured React event loop.LoopInterfaceimplementationsCloses #357.
Validation
composer testcomposer analyse— no errorsgit diff --check— cleanChecklist