[wip] Introduce combinators#13
Open
igalshilman wants to merge 3 commits into
Open
Conversation
- Restate.all/race/any/all_settled now return a CombinedFuture instead of blocking. The future carries a tree shape (variant + children) that the shared-core uses for cooperative-suspension decisions and that composes naturally — e.g. Restate.race(Restate.all(a, b), c).await. - CombinedFuture caches both values and TerminalErrors. The all-succeeded variant scans settled children to surface short-circuit failures so it doesn't block awaiting children still in flight after one fails. - Moved Server::Context#wait_combined above the private boundary so CombinedFuture can drive it via @ctx. - Bumped maxProtocolVersion 6 → 7 (wire bits already pass through the native ext; v7 will activate once the runtime negotiates it). - Interpreter, harness specs, example, RBS and docs updated to .await. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+482
to
+483
| // [:unknown, [child, ...]] → unknown combinator | ||
| fn do_await(&self, future_value: Value) -> Result<Value, Error> { |
Contributor
There was a problem hiding this comment.
why now you have do_await and do_progress? :D either one or the other
do_progress was a thin wrapper that built a FirstCompleted tree from a flat handle list and called the same shared-core entry point. Keep only do_await on both sides of the FFI; Server::Context#poll_or_cancel builds the tree itself before delegating to wait_combined. Single source of truth, ~57 fewer lines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
blocked on the 1.7 (protocol v7) release