Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CTimer::CTimerThread Class Reference
Inheritance diagram for CTimer::CTimerThread:
CThread

Public Member Functions

bool IsActive (const CTimer *timer) const
 
void Add (CTimer *timer)
 
- Public Member Functions inherited from CThread
 CThread (IRunnable *pRunnable, const char *ThreadName)
 
virtual ~CThread ()
 
void Create (bool bAutoDelete=false)
 
template<typename Rep , typename Period >
void Sleep (std::chrono::duration< Rep, Period > duration)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
bool Join (std::chrono::milliseconds duration)
 
bool SetPriority (const ThreadPriority &priority)
 Set the threads priority. This uses the platforms native threading library to do so.
 
bool SetTask (const ThreadTask &task)
 Assign the current thread a task for OS scheduling (platform dependent)
 
bool RevertTask ()
 Revert the current thread to normal scheduling (platform dependent)
 
virtual void OnException ()
 

Static Public Member Functions

static CTimerThread & Get ()
 
- Static Public Member Functions inherited from CThread
static const std::thread::id GetCurrentThreadId ()
 
static CThread * GetCurrentThread ()
 

Public Attributes

std::mutex m_mutex
 
std::condition_variable m_wakeUp
 
std::condition_variable m_callbackDone
 
std::vector< CTimer * > m_timers
 
const CTimer * m_current {nullptr}
 

Additional Inherited Members

- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
CEvent & GetStopEvent ()
 Set by StopThread(), i.e. once the owner may be blocked waiting for this thread.
 
WaitResponse AbortableWait (CEvent &event, std::chrono::milliseconds duration=std::chrono::milliseconds(-1))
 
- Protected Attributes inherited from CThread
std::atomic< bool > m_bStop
 

Member Function Documentation

◆ Add()

void CTimer::CTimerThread::Add ( CTimer * timer)
inline

◆ Get()

static CTimerThread & CTimer::CTimerThread::Get ( )
inlinestatic

◆ IsActive()

bool CTimer::CTimerThread::IsActive ( const CTimer * timer) const
inline

Member Data Documentation

◆ m_callbackDone

std::condition_variable CTimer::CTimerThread::m_callbackDone

◆ m_current

const CTimer* CTimer::CTimerThread::m_current {nullptr}

◆ m_mutex

std::mutex CTimer::CTimerThread::m_mutex

◆ m_timers

std::vector<CTimer*> CTimer::CTimerThread::m_timers

◆ m_wakeUp

std::condition_variable CTimer::CTimerThread::m_wakeUp

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