Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the semantics/requirements of the get_scheduler query #284

Open
lewissbaker opened this issue Aug 3, 2024 · 0 comments
Open

Clarify the semantics/requirements of the get_scheduler query #284

lewissbaker opened this issue Aug 3, 2024 · 0 comments
Labels
bug Something isn't working design P0

Comments

@lewissbaker
Copy link
Collaborator

The wording for the get_scheduler query in [exec.get.scheduler] just says:

get_scheduler asks a queryable object for its associated scheduler.

It does not say anything about the requirements are for the associated scheduler or that it should represent the "current scheduler" (as in the scheduler that a given operation will be started on) or that it represents a scheduler that will be used to launch new work.

However, there are several algorithms that seem to assume some semantic about get_scheduler.
For example:

  • let_value(sndr, func) injects the completion scheduler of sndr as the get_scheduler query result for the environment passed to the successor sender returned by func. Is this assuming that get_scheduler represents the scheduler that the operation was started on?
  • on(sch, sndr) transfers execution back to the get_scheduler from the environment connected to this sender.
    • This seems to be assuming that the get_scheduler represents the scheduler that the operation should complete on.
    • Also, it starts execution of the child operation on the specified scheduler, and sets the get_scheduler on the environment passed to the child operation to this scheduler. This seems to be assuming that the get_scheduler represents the scheduler the the child operation is started on.

There seems to be at least an assumption in these algorithms that the get_scheduler query represents some concept of the "current scheduler", for some definition of this. It would be good to add wording to the get_scheduler query that defines more clearly the intent here - perhaps by defining what "associated scheduler" means.

@lewissbaker lewissbaker added bug Something isn't working P0 design labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working design P0
Projects
None yet
Development

No branches or pull requests

1 participant