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

Support concurrent processing of messages by actor #39

Open
njam opened this issue Jan 19, 2021 · 0 comments
Open

Support concurrent processing of messages by actor #39

njam opened this issue Jan 19, 2021 · 0 comments

Comments

@njam
Copy link

njam commented Jan 19, 2021

As far as I understand the current implementation of start_actor() will process messages sequentially. The next message will only be processed, once the previous one is completely processed, even if the actor's async fn handle() yields.

Theoretically async fn handle() could be executed concurrently instead, for example by using something like StreamExt#for_each_concurrent().
But then handle() cannot be given mutable access to self anymore obviously. So the actor would need to use interior mutability to change state.

What are you thoughts on this?

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

No branches or pull requests

1 participant