Luanti 5.16.0-dev
Loading...
Searching...
No Matches
UpdateThread Class Referenceabstract

#include <thread.h>

Inheritance diagram for UpdateThread:
Collaboration diagram for UpdateThread:

Public Member Functions

 UpdateThread (const std::string &name)
 ~UpdateThread ()=default
void deferUpdate ()
void stop ()
void * run ()
Public Member Functions inherited from Thread
 Thread (const std::string &name="")
virtual ~Thread ()
bool start ()
bool stop ()
bool wait ()
bool isCurrentThread () const
bool isRunning () const
bool stopRequested () const
std::thread::id getThreadId () const
bool getReturnValue (void **ret) const
bool bindToProcessor (unsigned int proc_number)
bool setPriority (int prio)

Protected Member Functions

virtual void doUpdate ()=0

Private Attributes

Semaphore m_update_sem

Additional Inherited Members

Static Public Member Functions inherited from Thread
static ThreadgetCurrentThread ()
static void setName (const std::string &name)
static unsigned int getNumberOfProcessors ()
Protected Attributes inherited from Thread
std::string m_name

Constructor & Destructor Documentation

◆ UpdateThread()

UpdateThread::UpdateThread ( const std::string & name)
inline

References Thread::Thread().

Referenced by MeshUpdateWorkerThread::MeshUpdateWorkerThread(), and MinimapUpdateThread::MinimapUpdateThread().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~UpdateThread()

UpdateThread::~UpdateThread ( )
default

Member Function Documentation

◆ deferUpdate()

void UpdateThread::deferUpdate ( )
inline

References m_update_sem.

Referenced by MinimapUpdateThread::enqueueBlock().

Here is the caller graph for this function:

◆ doUpdate()

virtual void UpdateThread::doUpdate ( )
protectedpure virtual

Implemented in MeshUpdateWorkerThread, and MinimapUpdateThread.

Referenced by run().

Here is the caller graph for this function:

◆ run()

void * UpdateThread::run ( )
inlinevirtual

Implements Thread.

References BEGIN_DEBUG_EXCEPTION_HANDLER, doUpdate(), END_DEBUG_EXCEPTION_HANDLER, m_update_sem, and Thread::stopRequested().

Here is the call graph for this function:

◆ stop()

void UpdateThread::stop ( )
inline

References m_update_sem, and Thread::stop().

Here is the call graph for this function:

Member Data Documentation

◆ m_update_sem

Semaphore UpdateThread::m_update_sem
private

Referenced by deferUpdate(), run(), and stop().


The documentation for this class was generated from the following file: