You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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'sasync fn handle()
yields.Theoretically
async fn handle()
could be executed concurrently instead, for example by using something likeStreamExt#for_each_concurrent()
.But then
handle()
cannot be given mutable access toself
anymore obviously. So the actor would need to use interior mutability to change state.What are you thoughts on this?
The text was updated successfully, but these errors were encountered: