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?
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 toselfanymore obviously. So the actor would need to use interior mutability to change state.What are you thoughts on this?