Skip to content

ws: prefer actor pattern to StreamExt::split #3793

@vilgotf

Description

@vilgotf

Axum's WS documentation highlights the StreamExt::split method for independent send & recv tasks. This is, however, just an Arc<Mutex> wrapper (with all of its inherent performance overhead). The actor pattern for I/O resources is a higher performance alternative. Axum is a high performance web framework, so it's recommended patterns should similarly be high performance.

Refs: #2695

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions