Skip to content

inline_scheduler doesn't advertise scheduler, cause spawn_future fail to compile with task #1976

Description

@lixin-wei

according to exec.sched

For a given scheduler expression sch, the expression get_completion_scheduler<set_value_t>(get_env(schedule(sch))) shall compare equal to sch.

stdexec::inline_scheduler seems doesn't conform it.

which cause the following code fail to compile (compiler explorer):

ex::task<int> foo() { co_return 1; }

int main() {
  ex::simple_counting_scope scope;
  auto task = ex::inline_scheduler {}.schedule() | ex::let_value([foo = foo()]() mutable { return std::move(foo); });
  ex::spawn_future(std::move(task), scope.get_token());
}

I tried to add a query(get_completion_scheduler_t<set_value_t>) to it, but it broke a lot of tests. I wonder whether I understand it correctly?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions