Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
kodi::tools::CThread Class Referenceabstract

#include <Thread.h>

Inheritance diagram for kodi::tools::CThread:
kodi::tools::CTimer

Public Member Functions

 CThread ()
 Class constructor.
 
virtual ~CThread ()
 Class destructor.
 
bool IsAutoDelete () const
 Check auto delete is enabled on this thread class.
 
bool IsCurrentThread () const
 Check caller is on this running thread.
 
bool IsRunning () const
 Check thread inside this class is running and active.
 
void CreateThread (bool autoDelete=false)
 Create a new thread defined by this class on child.
 
void StopThread (bool wait=true)
 Stop a running thread.
 
void Sleep (uint32_t milliseconds)
 Thread sleep with given amount of milliseconds.
 
bool Join (unsigned int milliseconds)
 The function returns when the thread execution has completed or timing is reached in milliseconds beforehand.
 

Protected Member Functions

virtual void Process ()=0
 The function to be added by the addon as a child to carry out the process thread.
 

Protected Attributes

std::atomic< boolm_threadStop
 Atomic bool to indicate thread is active.
 

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