Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork21
feat: add allow_async? flag to compose DSL#256
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
399774e toa2a5871CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
a2a5871 to4171f3aCompareAdds the allow_async? flag to the compose DSL to control whethercomposed reactors can run their steps asynchronously.- Add allow_async? field to Reactor.Dsl.Compose struct (defaults to true)- Update DSL schema to include allow_async? option with documentation- Modify Builder.Compose to pass allow_async? to Step.Compose- Update Step.Compose to respect allow_async? when calling Reactor.run- Add comprehensive tests in test/reactor/dsl/compose_test.exs- Update documentation with usage examplesWhen allow_async? is true (default), the composed reactor runs withasync?: true, allowing concurrent step execution. When false, it runswith async?: false, forcing synchronous execution.Closes#22
4171f3a tof324015Compare981aea1 intomain 5 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto 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.
Summary
Adds the
allow_async?flag to thecomposeDSL to control whether composed reactors can run their steps asynchronously.Closes#22
Changes
allow_async?field toReactor.Dsl.Composestruct with default valuetrueallow_async?option with documentationBuilder.Composeto pass theallow_async?option toReactor.Step.ComposeStep.Composeto respect theallow_async?option when callingReactor.runtest/reactor/dsl/compose_test.exsto verify functionalityUsage
Behavior
allow_async? true(default): The composed reactor runs withasync?: true, allowing its steps to execute asynchronouslyallow_async? false: The composed reactor runs withasync?: false, forcing all its steps to execute synchronouslyImplementation Notes
This implementation uses runtime composition only (no compile-time composition), following the simplified approach introduced in commit716682f. The
allow_async?flag is passed through the DSL → Builder → Step chain and controls theasync?parameter passed toReactor.runinStep.Compose.Testing
Added comprehensive test coverage including:
allow_async?option