Skip to content

Documenting behavior of tokio::sync::mpsc::Receiver::recv_many for all cases #7540

@claudex

Description

@claudex

Version

v1.47.1

Platform

Linux

Description

The behavior of tokio::sync::mpsc::Receiver::recv_many is not well documented when limit > 1 and channel not closed.

The documentation doesn't explicitly tell what happen if limit > 1 and there are n messages (with 0 < n < limit) available. Will the function wait for limit messages (or the closing of the channel) or will it return immediately with n messages in the buffer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tokioArea: The main tokio crateM-syncModule: tokio/syncT-docsTopic: documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions