8000 Implemented shared state, simplified init phase, added more join points into context by EnvOut · Pull Request #6 · EnvOut/uactor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implemented shared state, simplified init phase, added more join points into context #6

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 24, 2024

Conversation

EnvOut
Copy link
Owner
@EnvOut EnvOut commented Nov 24, 2024

Based on the feedback provided for uactor, I’ve rewritten part of the library. Key updates include:

  1. Simplified actor initialization:

    • Replaced macros with regular method calls.
    • Streamlined the initialization process.
  2. Added more join points in context/actor for service logic (e.g., metrics, error handling).

  3. Introduced an alias for references using an unbounded MPSC channel:

    • Actor1Ref<mpsc::Sender<Actor1Msg>> -> Actor1MpscRef.
  4. Finalized the shared state feature:

    • An actor can now have shared state that is embedded within its reference.
    • Access the state via:
      actor1_ref.state()
    • Use case example in arbiter/upstream:
      actor1_ref.state().downstreams_count()

@EnvOut EnvOut merged commit efd5ac5 into main Nov 24, 2024
1 check passed
EnvOut added a commit that referenced this pull request Nov 24, 2024
…ts into context (#6)

* removed garbage

* restructured

* updated actors

* use Ref alias and code clean
EnvOut added a commit that referenced this pull request Nov 24, 2024
…ts into context (#6)

* removed garbage

* restructured

* updated actors

* use Ref alias and code clean
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
0