Single-threaded scheduler with configurable runnable-batch ordering.
More...
#include <debug_scheduler.hpp>
|
| bool | can_run () const noexcept |
| | Reports whether at least one runnable task exists.
|
| |
| | DebugScheduler (DebugSchedulerOptions options={}) |
| | Default-construct an empty scheduler.
|
| |
| bool | done () const noexcept |
| | Check whether the runnable queue is empty.
|
| |
| void | help_while_waiting (const WaitPredicate &is_ready) override |
| | Drives one runnable task while waiting for readiness.
|
| |
| DebugSchedulerOptions const & | options () const noexcept |
| | Return the scheduler's immutable ordering configuration.
|
| |
| void | pause () override |
| | Block the scheduler from running.
|
| |
| void | resume () override |
| | Unblock the scheduler.
|
| |
| void | run () |
| | Run one batch of scheduled coroutines in the configured order.
|
| |
| void | run_all () |
| | Run until no runnable tasks remain.
|
| |
| void | schedule (AsyncTask &&task) override |
| | Enqueue a task for later run.
|
| |
| | ~DebugScheduler () |
| | Destructor.
|
| |
template<class Function >
requires std::invocable<Function&, std::size_t> |
| void | execute_batch (std::size_t size, Function &&function) |
| | Execute a synchronous batch of independent lightweight work items.
|
| |
| virtual void | wait_for (const WaitPredicate &is_ready) |
| | Block the calling thread until is_ready returns true.
|
| |
| virtual void | wait_for (WaitRequest const &request) |
| | Block until a structured wait request becomes ready.
|
| |
| | ~IAsyncScheduler () override=default |
| | Virtual destructor.
|
| |
| virtual | ~IScheduler ()=default |
| | Virtual destructor.
|
| |
|
| void | enqueue_task (BasicTask &&task) |
| | Add one already-bound task to the runnable queue.
|
| |
| virtual void | resume_task (BasicTask &task) |
| | Resume one queued task in the execution context selected by this scheduler.
|
| |
Single-threaded scheduler with configurable runnable-batch ordering.
◆ DebugScheduler()
Default-construct an empty scheduler.
◆ ~DebugScheduler()
| uni20::async::DebugScheduler::~DebugScheduler |
( |
| ) |
|
|
inline |
◆ can_run()
| bool uni20::async::DebugScheduler::can_run |
( |
| ) |
const |
|
inlinenoexcept |
Reports whether at least one runnable task exists.
- Returns
true when the scheduler is not paused and has queued tasks.
◆ done()
| bool uni20::async::DebugScheduler::done |
( |
| ) |
const |
|
inlinenoexcept |
Check whether the runnable queue is empty.
- Returns
true if the scheduler has no queued tasks.
◆ enqueue_task()
| void uni20::async::DebugScheduler::enqueue_task |
( |
BasicTask && |
task | ) |
|
|
inlineprotected |
Add one already-bound task to the runnable queue.
◆ help_while_waiting()
| void uni20::async::DebugScheduler::help_while_waiting |
( |
const WaitPredicate & |
is_ready | ) |
|
|
inlineoverridevirtual |
Drives one runnable task while waiting for readiness.
- Parameters
-
| is_ready | Predicate that reports target readiness. |
Reimplemented from uni20::async::IAsyncScheduler.
◆ options()
Return the scheduler's immutable ordering configuration.
◆ pause()
| void uni20::async::DebugScheduler::pause |
( |
| ) |
|
|
inlineoverridevirtual |
◆ resume()
| void uni20::async::DebugScheduler::resume |
( |
| ) |
|
|
inlineoverridevirtual |
◆ resume_task()
| virtual void uni20::async::DebugScheduler::resume_task |
( |
BasicTask & |
task | ) |
|
|
inlineprotectedvirtual |
Resume one queued task in the execution context selected by this scheduler.
◆ run()
| void uni20::async::DebugScheduler::run |
( |
| ) |
|
|
inline |
Run one batch of scheduled coroutines in the configured order.
◆ run_all()
| void uni20::async::DebugScheduler::run_all |
( |
| ) |
|
|
inline |
Run until no runnable tasks remain.
◆ schedule()
| void uni20::async::DebugScheduler::schedule |
( |
AsyncTask && |
task | ) |
|
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: