Skip to content

Conversation

@unbalancedparentheses
Copy link
Contributor

Summary

  • Add child_spec! macro for creating child specifications:
    child_spec!(worker "counter", Counter::new(0).start())
    child_spec!(supervisor "sub_sup", SubSupervisor::start(spec))
  • Add supervisor_spec! macro for creating supervisor specifications:
    supervisor_spec!(OneForOne, [
        child_spec!(worker "w1", Worker::new().start()),
        child_spec!(worker "w2", Worker::new().start()),
    ])
    
    supervisor_spec!(OneForAll, max_restarts(5, 60), [
        child_spec!(worker "db", Db::new().start()),
    ])
  • Add dynamic_supervisor_spec! macro for dynamic supervisors:
    dynamic_supervisor_spec!()
    dynamic_supervisor_spec!(max_children(50), max_restarts(10, 60))
  • Add strategy() getter to SupervisorSpec
  • Add get_max_children() getter to DynamicSupervisorSpec

Test plan

  • All 88 tests pass (9 new macro tests)
  • Clippy passes

🤖 Generated with Claude Code

unbalancedparentheses and others added 8 commits January 8, 2026 02:23
- Add child_spec! macro for creating child specifications
- Add supervisor_spec! macro for creating supervisor specifications
- Add dynamic_supervisor_spec! macro for dynamic supervisors
- Add strategy() getter to SupervisorSpec
- Add get_max_children() getter to DynamicSupervisorSpec

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@unbalancedparentheses unbalancedparentheses changed the title feat: add supervision macros feat: add supervision macros [19/24] Jan 9, 2026
@unbalancedparentheses unbalancedparentheses changed the title feat: add supervision macros [19/24] [19/24] feat: add supervision macros Jan 9, 2026
@unbalancedparentheses
Copy link
Contributor Author

Reorganizing PR sequence for coherent implementation order. This content will be included in the new PR series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant