Skip to content

Support concurrent processing of messages by actor #39

Description

@njam

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions