Repository navigation
Deferred choice: the first branch whose wait goes on wins - #138
Merged
Merged
Conversation
FBDeferredChoice is a split whose branches each lead into a waiting spot - a condition wait, a trigger target, a remote flow, a sub flow call - and of which exactly one goes on: the first one whose wait is resumed. The others fall the moment the choice is decided, queued or parked, standing in a loop or a sub flow, in this instance or one executing inside it. An FBDeferredChoiceDecided records the winner. The decision is made where a wait goes on, in the one continuation path FBBaseExecutor>>resume:withToken:value:, before the wait is taken out; a condition wait whose condition holds at once and a sub flow call that runs through decide it as well. A pass remembers its origin token and whether it was decided. A branch that could not wait is refused when the choice runs. A withdrawal now takes the tokens of standing activations too - a fork whose loop is open, a sub flow node whose child runs - when they lie on the strand taken back: the loop starts nothing more and the frame pops quietly, the call reading #cancelled. cancelStrand: into a sub flow thus ends the call instead of failing the caller. Co-Authored-By: Claude Fable 5.1 <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.
FBDeferredChoice is a split whose branches each lead into a waiting spot - a condition wait, a trigger target, a remote flow, a sub flow call - and of which exactly one goes on: the first one whose wait is resumed. The others fall the moment the choice is decided, queued or parked, standing in a loop or a sub flow, in this instance or one executing inside it. An FBDeferredChoiceDecided records the winner.
The decision is made where a wait goes on, in the one continuation path FBBaseExecutor>>resume:withToken:value:, before the wait is taken out; a condition wait whose condition holds at once and a sub flow call that runs through decide it as well. A pass remembers its origin token and whether it was decided. A branch that could not wait is refused when the choice runs.
A withdrawal now takes the tokens of standing activations too - a fork whose loop is open, a sub flow node whose child runs - when they lie on the strand taken back: the loop starts nothing more and the frame pops quietly, the call reading #cancelled. cancelStrand: into a sub flow thus ends the call instead of failing the caller.