Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
jimsynz merged 1 commit intomainfromfeat/compose-allow-async
Aug 7, 2025

Conversation

@jimsynz
Copy link
Contributor

Summary

Adds theallow_async? flag to thecompose DSL to control whether composed reactors can run their steps asynchronously.

Closes#22

Changes

  • Addedallow_async? field toReactor.Dsl.Compose struct with default valuetrue
  • Updated DSL schema to include the newallow_async? option with documentation
  • ModifiedBuilder.Compose to pass theallow_async? option toReactor.Step.Compose
  • UpdatedStep.Compose to respect theallow_async? option when callingReactor.run
  • Added comprehensive tests intest/reactor/dsl/compose_test.exs to verify functionality
  • Updated documentation with usage examples

Usage

compose:create_user,UserReactordoargument:name,input(:user_name)argument:email,input(:user_email)allow_async?false# Forces synchronous executionend

Behavior

  • allow_async? true (default): The composed reactor runs withasync?: true, allowing its steps to execute asynchronously
  • allow_async? false: The composed reactor runs withasync?: false, forcing all its steps to execute synchronously

Implementation Notes

This implementation uses runtime composition only (no compile-time composition), following the simplified approach introduced in commit716682f. Theallow_async? flag is passed through the DSL → Builder → Step chain and controls theasync? parameter passed toReactor.run inStep.Compose.

Testing

Added comprehensive test coverage including:

  • Basic compose functionality withallow_async? option
  • DSL structure validation to ensure options are correctly passed through
  • Process ID tracking to verify actual async/sync behavior
  • Multi-argument compose scenarios

@jimsynzjimsynzforce-pushed thefeat/compose-allow-async branch froma2a5871 to4171f3aCompareAugust 7, 2025 21:26
Adds 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
@jimsynzjimsynzforce-pushed thefeat/compose-allow-async branch from4171f3a tof324015CompareAugust 7, 2025 21:30
@jimsynzjimsynz merged commit981aea1 intomainAug 7, 2025
5 checks passed
@jimsynzjimsynz deleted the feat/compose-allow-async branchAugust 8, 2025 03:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@barnabasJbarnabasJbarnabasJ left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Addallow_async? flag tocompose

3 participants

@jimsynz@barnabasJ

[8]ページ先頭

©2009-2025 Movatter.jp