Skip to content

parallelFirst with cancel #16

@nstepp

Description

@nstepp

At first I thought that parallelFirst was exactly what I needed for my problem, but unless I'm not using it right (which is very possible), it's just a bit different than I was expecting.

It returns the first result, but all actions are computed, instead of canceling the remaining computations after the first result. Is it supposed to cancel them, and I'm seeing an odd behavior?

Would it match the intended semantics of parallelFirst if it were changed to this behavior, or would a parallelFirstCancel be useful? There is an analogous function in async: waitAnyCancel, but it doesn't provide the pool mechanics or use Maybe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions