Skip to content

{#design-fpg} Questions about forward_progress_guarantee and get_forward_progress_guarantee() #106

Open
@ericniebler

Description

@ericniebler

Issue by lewissbaker
Wednesday Dec 29, 2021 at 11:02 GMT
Originally opened as NVIDIA/stdexec#349


Does the get_forward_progress_guarantee() CPO only apply to the schedule() operation?
Do we intend it to also apply to all future operations we may add to the scheduler?
e.g. execution contexts on which a schedule_after() or a file-read-operation on a file associated with an io_scheduler?

And does the guarantee need to be with respect to all other threads in the system?
Or only with respect to other tasks scheduled with that same scheduler?

There also doesn't seem to be a good definition of what constitutes an "execution agent created by that scheduler".
In the case of the run_loop context, is the thread that calls run() "created by that scheduler"?
Is each task enqueued to the run_loop context a separate execution agent?

What would be an example of a scheduler that provides the concurrent guarantee?
A thread-pool that shares a thread between tasks enqueued to it would only provide parallel.
A new_thread_scheduler that always spawned a std::thread may still fail to spawn the thread in which case the task is not executed. It can still only guarantee that the task will run with concurrent forward progress once it starts and so presumably also only provides parallel forward progress?

Is a schedule() operation that completes with an error still required to provide the guarantee on that context that calls set_error()?
Does the get_forward_progress_guarantee() result only relate to the context that schedule() operations complete with set_value() on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionWe need to talk about this; there's nothing actionable here yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions