Lumiera
0.pre.03
»edit your freedom«
|
#include "vault/gear/scheduler-invocation.hpp"
Scheduler Layer-1 : time based dispatch.
Manages pointers to Render Activity records.
Definition at line 148 of file scheduler-invocation.hpp.
Public Member Functions | |
void | activate (ManifestationID manID) |
Enable entries marked with a specific ManifestationID to be processed. More... | |
void | discardSchedule () |
forcibly clear out the schedule | |
void | drop (ManifestationID manID) |
bool | empty () const |
void | feedPrioritisation () |
Pick up all new events from the entrance queue and enqueue them to be retrieved ordered by start time. | |
void | feedPrioritisation (ActivationEvent actEvent) |
Feed the given Activity directly into time prioritisation, effectively bypassing the thread dispatching entrance queue. More... | |
bool | hasPendingInput () const |
Time | headTime () const |
void | instruct (ActivationEvent actEvent) |
Accept an ActivationEvent with an Activity for time-bound execution. | |
bool | isActivated (ManifestationID manID) const |
determine if Activities with the given ManifestationID shall be processed | |
bool | isDue (Time now) const |
Determine if there is work to do right now. | |
bool | isMissed (Time now) const |
determine if the Activity at scheduler head missed it's deadline. More... | |
bool | isOutdated (Time now) const |
determine if Activity at scheduler is outdated and should be discarded | |
bool | isOutOfTime (Time now) const |
detect a compulsory Activity at scheduler head with missed deadline | |
ActivationEvent | peekHead () |
ActivationEvent | pullHead () |
Retrieve from the scheduling queue the entry with earliest start time. More... | |
Private Types | |
using | ActivationSet = std::unordered_set< ManifestationID > |
using | InstructQueue = boost::lockfree::queue< ActivationEvent > |
using | PriorityQueue = std::priority_queue< ActivationEvent > |
Static Private Member Functions | |
static int64_t | waterLevel (Time time) |
Private Attributes | |
ActivationSet | allowed_ |
InstructQueue | instruct_ |
PriorityQueue | priority_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
|
inline |
Feed the given Activity directly into time prioritisation, effectively bypassing the thread dispatching entrance queue.
Definition at line 208 of file scheduler-invocation.hpp.
|
inline |
Definition at line 219 of file scheduler-invocation.hpp.
Referenced by SchedulerInvocation_test::simpleUsage(), SchedulerInvocation_test::verify_isDue(), SchedulerCommutator_test::verify_postChain(), SchedulerInvocation_test::verify_Queuing(), and SchedulerInvocation_test::verify_WaterLevel().
|
inline |
Retrieve from the scheduling queue the entry with earliest start time.
Definition at line 232 of file scheduler-invocation.hpp.
Referenced by SchedulerCommutator::findWork(), SchedulerCommutator::maintainQueueHead(), SchedulerInvocation_test::simpleUsage(), SchedulerInvocation_test::verify_isDue(), SchedulerCommutator_test::verify_postChain(), SchedulerInvocation_test::verify_Queuing(), SchedulerInvocation_test::verify_stability(), and SchedulerInvocation_test::verify_WaterLevel().
|
inline |
Enable entries marked with a specific ManifestationID to be processed.
By default, entries are marked with the default ManifestationID, which is always implicitly activated. Any other ID must be actively allowed, otherwise the entry is deemed outdated and will be silently discarded in regular processing by Layer-2.
Definition at line 249 of file scheduler-invocation.hpp.
Referenced by Scheduler::seedCalcStream().
|
inline |
determine if the Activity at scheduler head missed it's deadline.
Definition at line 275 of file scheduler-invocation.hpp.
|
inline |
Definition at line 323 of file scheduler-invocation.hpp.
References Time::NEVER.
Referenced by SchedulerCommutator::dispatchCapacity(), SchedulerCommutator_test::verify_dispatch(), and SchedulerCommutator_test::verify_postChain().