Skip to content

New JoinDeque as FIFO-ordered analog of JoinSet #7576

@nickkuk

Description

@nickkuk

Is your feature request related to a problem? Please describe.
Several times people noted the analogies between tokio::task::JoinSet and futures::stream::FuturesUnordered and futures::StreamExt::buffer_unordered method. The JoinSet structure is considered more convenient to use and allows users to implement the same things as its counterparts from the futures crate.

At the same time, there is no analog for futures::stream::FuturesOrdered and futures::StreamExt::buffered in tokio.

Describe the solution you'd like
I'm suggesting to add tokio::task::JoinDeque data structure. Potential implementation can be found here.

Describe alternatives you've considered
Leave it for tokio users to implement themselves.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tokio-utilArea: The tokio-util crateC-feature-requestCategory: A feature request.M-taskModule: tokio/task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions