Isle
|
MxTickleThread periodically calls Tickle() on a target MxCore object in a separate thread. More...
#include <mxticklethread.h>
Public Member Functions | |
MxTickleThread (MxCore *p_target, MxS32 p_frequencyMS) | |
[AI] Constructs a MxTickleThread to tickle a target MxCore object at a fixed interval. More... | |
MxResult | Run () override |
[AI] Thread entry point. More... | |
![]() | |
virtual MxResult | Run () |
[AI] Virtual function executed when the thread runs. More... | |
MxResult | Start (MxS32 p_stackSize, MxS32 p_flag) |
[AI] Starts the thread with a given stack size and creation flags. More... | |
void | Terminate () |
[AI] Signals the thread to terminate. More... | |
void | Sleep (MxS32 p_milliseconds) |
[AI] Sleeps the current thread for the given duration in milliseconds. More... | |
MxBool | IsRunning () |
[AI] Returns whether the thread is currently running. More... | |
virtual | ~MxThread () |
[AI] Virtual destructor for MxThread. More... | |
Additional Inherited Members | |
![]() | |
MxThread () | |
[AI] Protected constructor for MxThread. More... | |
![]() | |
MxCore * | m_target |
[AI] Pointer to the target object (optional, typically the object being processed by the thread). Offset 0x18 More... | |
MxTickleThread periodically calls Tickle() on a target MxCore object in a separate thread.
[AI]
[AI] This thread class is used to 'tickle' (update/poll) a target MxCore object at a fixed interval (specified in milliseconds). The Tickle mechanism is central to frame updating and ticking logic in LEGO Island's event loop. The thread executes until IsRunning() is false, after which it delegates to the base MxThread::Run(). [AI]
Definition at line 15 of file mxticklethread.h.
[AI] Constructs a MxTickleThread to tickle a target MxCore object at a fixed interval.
p_target | [AI] Pointer to the MxCore object that should be tickled periodically. |
p_frequencyMS | [AI] The tickling frequency in milliseconds, i.e., the interval between calls to Tickle(). |
Definition at line 10 of file mxticklethread.cpp.
|
overridevirtual |
[AI] Thread entry point.
Starts the tickling loop, calling Tickle() on m_target at the specified interval.
[AI] Repeatedly calculates elapsed time and sleeps as needed to maintain the requested tickle frequency. Handles clock wrap-around. Exits when IsRunning() returns false and then calls the base class Run(). [AI]
Reimplemented from MxThread.
Definition at line 18 of file mxticklethread.cpp.