Skip to content

bulk doesn't give the caller a way to constrain how function can be executed #275

Open
@lewissbaker

Description

@lewissbaker

There is currently no way for a caller that invokes the bulk() algorithm to indicate to that algorithm that a given strategy for invoking f is either allowed or not allowed to invoke f concurrently.

Ideally, the caller of bulk() would be able to pass an execution policy (e.g. seq, par, unseq, par_unseq) to indicate in which ways it is safe to execute f.

e.g. stdex::bulk(pred, stdex::par, n, f) to indicate that f is safe to call concurrently on multiple threads from an execution context that provides parallel forward progress, but not safe to call concurrently from execution agents with weak forward progress guarantees.

e.g. stdex::bulk(pred, stdex::seq, n, f) to indicate that f is only safe to call sequentially, even if you're on an execution context that can potentially execute across multiple threads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Paper existsPaper exists, either WIP or pending-wg21bugSomething isn't workingdesignpending-wg21A paper or an LWG issue exitsprocessedprocessed in a meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions