Skip to content

Conversation

@ElFantasma
Copy link
Collaborator

@ElFantasma ElFantasma commented Jan 22, 2026

Summary

  • Rename all GenServer-related types and methods to more accessible Actor terminology
  • Align APIs between tasks and threads modules
  • Update all examples and documentation

Breaking Changes

Type Renames:

Old New
GenServer Actor
GenServerHandle ActorRef
GenServerError ActorError
CallMsg Request
CastMsg Message
OutMsg Reply
CallResponse RequestResponse
CastResponse MessageResponse

Method Renames:

Old New
handle_call() handle_request()
handle_cast() handle_message()
call() request()
call_with_timeout() request_with_timeout()
cast() send()

File Renames:

  • gen_server.rsactor.rs (both tasks and threads modules)

New Features (threads module)

  • request_with_timeout() using crossbeam's recv_timeout
  • teardown() callback for cleanup
  • init() now returns InitResult<Self> for consistency with tasks module
  • send_message_on() sync equivalent of the tasks version

Documentation

  • Added "Erlang to Spawned Terminology" section in README with mapping table
  • Updated all code examples in READMEs

Test plan

  • cargo build --workspace passes
  • cargo test --workspace passes (26 tests)
  • cargo clippy --workspace passes with no warnings

Closes #115
Closes #117
Closes #118
Closes #119
Closes #121
Closes #135

@ElFantasma ElFantasma force-pushed the feature/rename-genserver-to-actor branch from 1632b6b to 77692da Compare January 22, 2026 21:35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be easier to review if the process had been:

  1. git mv genserver.rs actor.rs
  2. Modify actor.rs
  3. git add actor.rs

@ElFantasma ElFantasma merged commit 3329641 into main Jan 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants