Skip to content

Conversation

@unbalancedparentheses
Copy link

Summary

Add foundational types for process management:

  • Pid: unique process identifiers with Erlang-style display (<0.123>)
  • Link: process linking and monitoring types (MonitorRef, SystemMessage)
  • ProcessTable: global table for tracking links and monitors between processes
  • Registry: name-based process lookup (register, whereis, unregister)

These types form the foundation for Erlang-style process management. They are standalone for now but will be integrated with GenServer in PR [3/3].

Test plan

  • All existing tests pass
  • New tests for Pid, Link, ProcessTable, and Registry pass
  • Runs with --test-threads=1 to avoid registry race conditions

🤖 Generated with Claude Code

… [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>
unbalancedparentheses added a commit to unbalancedparentheses/spawned that referenced this pull request Jan 9, 2026
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 unbalancedparentheses changed the title feat: add process infrastructure (pid, link, process_table, registry) [1/3] feat: add process infrastructure (pid, link, process_table, registry) [1/2] Jan 9, 2026
@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