Skip to content

Make send and associated send_* functions async #191

@udoprog

Description

@udoprog

We currently (upcoming 0.14) have a Sender which uses an unbounded channel for outgoing messages. This doesn't provide any back pressure to the send function in case we are unable to process the messages quickly enough, possibly leading to OOM conditions.

A fairly straight forward way to solve this would be to limit the buffer size of the channel (See buffer indocumentation). This does mean that the sender needs to use send and .await over it as appropriate, requiring all send-related functions to be async This would mean an impactful API overhaul, but it would in my view be worthwhile.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions