Skip to content

Should the default implementation of bulk support cancellation? #278

Open
@lewissbaker

Description

@lewissbaker

In P2300R10, the default implementation of bulk is specified to just call f N times in a loop.

However, this loop does not attempt to inspect any stop-token to watch for a stop-request.
This means that once it starts executing there is no way to get it to stop.

If this is a loop of N=1'000'000 iterations that will run for 30s+ then there could be quite a large latency waiting for the operation to complete in the case that the result is no longer required and a stop-request has been issued.

Should we be requiring that the default bulk operation periodically checks for a stop-request if the receiver connected to the bulk operation has a stop-token with stop_possible() equal to true?

Customizations need not be required to check for a stop-request, but we should at least consider specifying the default implementation to check for a stop-request and early-exit the for-loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Paper existsPaper exists, either WIP or pending-wg21designdiscussionWe need to talk about this; there's nothing actionable here yetneeds-paperNeeds a paper to be writtenpending-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