Skip to content

run_loop::schedule() should not have set_stopped_t() in its completion signatures if passed an env with an unstoppable_token #294

Open
@lewissbaker

Description

@lewissbaker

[exec.run.loop.types] p5 specifies that the completion-signatures of the run-loop-sender are always:

  completion_signatures<set_value_t(), set_error_t(exception_ptr), set_stopped_t()>

However, if the environment of the receiver connected to this sender has an unstoppable stop-token then it will never call set_stopped_t. We should conditionally add the set_stopped_t completion-signature only if the environment has a stop-token where a stop is possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lewissbaker@ericniebler

        Issue actions

          `run_loop::schedule()` should not have `set_stopped_t()` in its completion signatures if passed an env with an `unstoppable_token` · Issue #294 · cplusplus/sender-receiver