157 void Do( Ticks::Duration::TDuration until ) {
Do(
Ticks::Now() + until ); }
ALIB_DLL 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.
virtual ALIB_DLL void Run() override
Implementation of the parent interface (virtual abstract).
virtual ALIB_DLL void Stop()
Stops the trigger thread and joins it.
ALIB_DLL void Do(Ticks until)
void Do(Ticks::Duration until)
List< MonoAllocator, TriggerEntry > triggerList
The list of registered triggered objects.
ALIB_DLL void Remove(Triggered &triggered)
ALIB_DLL Trigger()
Constructor.
virtual ALIB_DLL ~Trigger() override
Destructor.
friend class Trigger
Type alias in namespace alib.
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(""))
virtual ALIB_DLL void Start()
threadmodel::Triggered Triggered
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
time::Ticks Ticks
Type alias in namespace alib.
threadmodel::Trigger Trigger
Type alias in namespace alib.
containers::List< TAllocator, T, TRecycling > List
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)