Spec-Zone.ru › C++

std::execution::run_loop::get_scheduler

/*run-loop-scheduler*/ get_scheduler() noexcept;
(since C++26)

Obtains a scheduler associated with the run_loop object.

The returned object has an unspecified type, denoted here as /*run-loop-scheduler*/, that models scheduler.

Return value

An instance of /*run-loop-scheduler*/ that can be used to schedule work onto this run_loop instance.

Notes

Scheduler objects obtained from a run_loop remain valid until the end of the lifetime of the run_loop object from which they were obtained.

Two /*run-loop-scheduler*/ objects compare equal if and only if they were obtained from the same run_loop object.

Calling schedule on the returned scheduler creates a sender associated with this run_loop. When the resulting operation state is started, the work is enqueued in the loop and is executed by a subsequent call to run.

Example

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/execution/run_loop/get_scheduler

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API