Test seam: called at each SchedulerStep with the index of the worker the step concerns. More...
#include "donner/base/tasks/TaskScheduler.h"
Public Member Functions | |
| virtual WorkerThreadCreate | workerThreadCreate (std::size_t) |
Returns the platform create function to use for the zero-based startup attempt. | |
| virtual int | setWorkerQos (WorkerQos qos) |
| Applies the worker's platform QoS hint, or injects a refusal in a test. | |
| virtual void | at (SchedulerStep step, std::size_t worker)=0 |
Called at step. | |
| virtual bool | lastAwakeRule () const |
| Whether the last-awake rule applies. | |
| virtual bool | allowParallelismWake () const |
| Lets a test isolate the mandatory publish handshake when an optional wake hint is missed. | |
Test seam: called at each SchedulerStep with the index of the worker the step concerns.
Production schedulers have none, and each step then costs one branch on a search, wait or wake transition. A supplied hook must outlive the scheduler and any resumption publication or join registration still returning after its continuation ran.
|
pure virtual |
Called at step.
| step | The protocol step. |
| worker | The worker the step concerns: the sleeper, the woken worker or the finisher; zero for SchedulerStep::AfterPublishPush, SchedulerStep::AfterStopFlagSet and the scope steps on a non-worker. SchedulerStep::AfterAdoptedPush reports the slot index. |
|
inlinenodiscardvirtual |
Whether the last-awake rule applies.
Tests that must be observed failing without the rule return false; with it off, the last awake worker waiting past its margin sleeps even when work is queued.