Skip to content

Clarify the semantics/requirements of the get_scheduler query #284

Open
@lewissbaker

Description

@lewissbaker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0bugSomething isn't workingdesignneeds-proposed-resolutionThis issue does not yet have a proposed resolution but needs one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions