Skip to content

Conversation

@unbalancedparentheses
Copy link

Summary

Add supervision trees and integrate process primitives with GenServer:

Supervisor

  • Supervisor with OneForOne, OneForAll, RestForOne restart strategies
  • DynamicSupervisor for runtime child management
  • ChildSpec with Permanent, Transient, Temporary restart types
  • Restart intensity tracking to prevent restart storms

GenServer Integration

  • GenServer now registers with process table on start
  • GenServerHandle implements HasPid trait
  • Added link(), unlink(), monitor(), demonitor() methods
  • Added register() and unregister() for name-based lookup
  • Support for trap_exit to receive EXIT messages via handle_info

Examples

  • Added supervisor example demonstrating Supervisor usage

Dependencies

⚠️ This PR depends on #102 and should be merged after it.

Merge order: #102 → This PR → #104 (TBD)

Test plan

  • All existing tests pass (79 tests)
  • New supervisor tests pass (integration and unit tests)
  • Runs with --test-threads=1 to avoid registry race conditions

🤖 Generated with Claude Code

unbalancedparentheses and others added 2 commits January 9, 2026 20:21
… [1/3]

Add foundational types for process management:
- Pid: unique process identifiers
- Link: process linking and monitoring types (MonitorRef, SystemMessage)
- ProcessTable: global table for tracking links and monitors
- Registry: name-based process lookup

These types form the foundation for Erlang-style process management.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add supervision trees and integrate process primitives with GenServer:

**Supervisor**
- Supervisor with OneForOne, OneForAll, RestForOne strategies
- DynamicSupervisor for runtime child management
- ChildSpec with Permanent, Transient, Temporary restart types
- Restart intensity tracking to prevent restart storms

**GenServer Integration**
- GenServer now registers with process table on start
- GenServerHandle implements HasPid trait
- Added link(), unlink(), monitor(), demonitor() methods
- Added register() and unregister() for name-based lookup
- Support for trap_exit to receive EXIT messages via handle_info

**Examples**
- Added supervisor example demonstrating Supervisor usage

This builds on PR lambdaclass#102 (process infrastructure).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@unbalancedparentheses
Copy link
Author

Closing: Replaced by new PR sequence #105-#107 with Backend enum first approach.

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