Skip to content
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

Remove Context::attach in favor of implementing Clone #117

Merged
merged 9 commits into from
Jul 12, 2022

Conversation

thomaseizinger
Copy link
Collaborator

Fixes #95.

This makes `attach` simpler.
This way, it is easier to see that we are spawning 4 actors.
The implementation is so simple, people can just clone the context
themselves and call `run`.

This shrinks the public API of xtra.
These extra visibility modifiers are not needed.
This is only used internally and using it requires careful
evaluation of invariants as another instance of the receiver
is handling the same broadcast mailbox.
This allows us to use `.clone` everywhere and remove the
`cloned_new_broadcast_mailbox` function.
Some people may look for keywords like "multiple actors" instead of
"message stealing".
@Restioson Restioson merged commit 82abeb0 into master Jul 12, 2022
@thomaseizinger thomaseizinger deleted the remove-attach-context branch July 14, 2022 00:51
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.

Remove Context::attach in favor of cloning Context
2 participants