Repository navigation
feat(core): add scoped dynamic fiber groups - #103
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32825fde8a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
FiberGroup<E>owns dynamically arriving jobs in the creating scope.startreturns each member's typed Fiber,awaitEmptywaits for current members and their owned cleanup, andjoinretains the first qualifying failure or waits for closure. A failure leaves the group open; scope closure stops and waits for members.For a long-lived input flow, create
uploadswithFiberGroup.create<UploadError>()inside the service scope. Pure member cancellation is ignored unless that submission usespropagateCancellation: true; shutdown cancellation is excluded. Cancelling a waiter leaves the members owned.The implementation composes Scope, Fiber and the existing completion primitive. Membership is installed before first evaluation to support synchronous and reentrant tasks. Later independent failures reuse Runtime reporting and occurrence tracking, excluding occurrences already retained by the group's first failure; cleanup defects owned by shutdown stay on that path. Member reads do not change failure responsibility.
Related issues
Closes #69
Validation
dart pub getdart format --output=none --set-exit-if-changed .dart analyze --fatal-infosdart test— 1,401 tests passed.Seventeen focused tests cover typed synchronous results, nullable/repeated failure waits, continued submissions, occurrence-preserving reports, cancellation policy and origin during shutdown, cancelled waiters, shutdown with native work and cleanup, reentrant finalizers, closed groups and runtime ownership. Ordering uses explicit completion gates.