Skip to content

Feature Request: Ordered ResultPool for function call order preservation #115

@nolotz

Description

@nolotz

Hello,

First, I would like to express my gratitude for your hard work on the conc library. The structured concurrency it brings to Go makes complex tasks a lot more manageable.

I am writing to propose a new feature that would further enrich the functionality of the library. The idea is to create a new type of entity that combines the functionalities of ResultPool and Stream. The main goal of this entity would be to provide a concurrent task runner that not only collects task results but also maintains the order of the calls to the functions. In simpler terms, it would give you a slice ordered by the call order of functions.

Currently, the ResultPool is great for running tasks concurrently and collecting the results, but it doesn't necessarily maintain the order of the functions calls. On the other hand, the Stream entity allows for processing an ordered stream of tasks in parallel but does not collect the results.

The proposed entity could be very useful in situations where you want to run tasks concurrently, collect their results, and also preserve the order of the tasks.

Please, let me know what you think about this proposal. I am also open to contributing towards the development of this feature if that would be acceptable.

Thank you for your time and consideration.

Solves #110

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions