161 void Do( Ticks::Duration::TDuration until ) {
Do(
Ticks::Now() + until ); }
void Add(Triggered &triggered, bool initialWakeup=false)
bool isConditionMet() const noexcept
bool internalThreadMode
Denotes whether or not the trigger is currently used in internal thread mode.
ListMA< TriggerEntry > triggerList
The list of registered triggered objects.
virtual void Run() override
Implementation of the parent interface (virtual abstract).
virtual void Stop()
Stops the trigger thread and joins it.
void Do(Ticks::Duration until)
void Remove(Triggered &triggered)
virtual ~Trigger() override
Destructor.
Triggered(const String &pName)
virtual Ticks::Duration triggerPeriod()=0
virtual ~Triggered()
Virtual empty destructor. Needed with any virtual class.
Thread(const character *pName=A_CHAR(""))
containers::List< T, MonoAllocator, TRecycling > ListMA
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
threadmodel::Triggered Triggered
Type alias in namespace alib.
time::Ticks Ticks
Type alias in namespace alib.
threadmodel::Trigger Trigger
Type alias in namespace alib.
Triggered * Target
The triggered object.
TriggerEntry(TriggerEntry &)=delete
Deleted copy constructor (to avoid working on copies accidentally).
TriggerEntry(Triggered *target, const Ticks &nextWakeup)
Ticks NextWakeup
The next wakeup time.
TCondition(const character *dbgName)