std::execution::run_loop::run
From cppreference.com
void run() noexcept;
|
(since C++26) | |
Runs work queued in the run_loop on the calling thread.
Preconditions
The run_loop instance's state is either starting or finishing.
Effects
If the run_loop instance's state is starting, changes the state to running. Otherwise, leaves the state unchanged.
Then repeatedly removes the first queued operation state and executes it, as if by:
while (auto* op = pop-front())
op->execute();
The internal pop-front operation blocks until either a work item is available, or the loop's count is 0 and its state is finishing. In the latter case, it changes the state to finished and causes run to return.
Example
| This section is incomplete Reason: no example |