51#ifndef SRC_VAULT_GEAR_SCHEDULER_INVOCATION_H_
52#define SRC_VAULT_GEAR_SCHEDULER_INVOCATION_H_
62#include <boost/lockfree/queue.hpp>
63#include <unordered_set>
102 ,
bool compulsory =
false)
104 ,
starting{_raw(act.constrainedStart(when))}
105 ,
deadline{_raw(act.constrainedDeath(dead))}
183 bool success =
instruct_.push (move (actEvent));
185 throw error::Fatal{
"Scheduler entrance: memory allocation failed"};
Descriptor for a piece of operational logic performed by the scheduler.
basic constant internal time value.
Lumiera's internal time value datatype.
static const Time NEVER
border condition marker value. NEVER >= any time value
Derived specific exceptions within Lumiera's exception hierarchy.
Any copy and copy construction prohibited.
Record to describe an Activity, to happen within the Scheduler's control flow.
Time constrainedStart(Time start)
Time constrainedDeath(Time death)
Marker for current (and obsolete) manifestations of a CalcStream processed by the Render-Engine.
Scheduler Layer-1 : time based dispatch.
void feedPrioritisation(ActivationEvent actEvent)
Feed the given Activity directly into time prioritisation, effectively bypassing the thread dispatchi...
void drop(ManifestationID manID)
void instruct(ActivationEvent actEvent)
Accept an ActivationEvent with an Activity for time-bound execution.
std::priority_queue< ActivationEvent > PriorityQueue
static int64_t waterLevel(Time time)
bool isDue(Time now) const
Determine if there is work to do right now.
bool hasPendingInput() const
boost::lockfree::queue< ActivationEvent > InstructQueue
std::unordered_set< ManifestationID > ActivationSet
bool isOutOfTime(Time now) const
detect a compulsory Activity at scheduler head with missed deadline
bool isMissed(Time now) const
determine if the Activity at scheduler head missed it's deadline.
bool isOutdated(Time now) const
determine if Activity at scheduler is outdated and should be discarded
void activate(ManifestationID manID)
Enable entries marked with a specific ManifestationID to be processed.
void feedPrioritisation()
Pick up all new events from the entrance queue and enqueue them to be retrieved ordered by start time...
bool isActivated(ManifestationID manID) const
determine if Activities with the given ManifestationID shall be processed
void discardSchedule()
forcibly clear out the schedule
ActivationEvent pullHead()
Retrieve from the scheduling queue the entry with earliest start time.
ActivationEvent peekHead()
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
const size_t INITIAL_CAPACITY
Vault-Layer implementation namespace root.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
bool operator<(ActivationEvent const &o) const
void refineTo(Activity *chain, Time when, Time dead)
ActivationEvent(Activity &act, Time when, Time dead=Time::NEVER, ManifestationID manID=ManifestationID(), bool compulsory=false)
a family of time value like entities and their relationships.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Basic set of definitions and includes commonly used together (Vault).