Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
IThreadImpl Class Referenceabstract

#include <IThreadImpl.h>

Inheritance diagram for IThreadImpl:
CThreadImplLinux CThreadImplPosix CThreadImplWin

Public Member Functions

virtual ~IThreadImpl ()=default
 
virtual void SetThreadInfo (const std::string &name)=0
 Set the thread name and other info (platform dependent)
 
virtual bool SetPriority (const ThreadPriority &priority)=0
 Set the thread priority via the native threading library.
 
virtual bool SetTask (const ThreadTask &task)
 Assign the current thread a task for OS scheduling (platform dependent)
 
virtual bool RevertTask ()
 Revert the current thread to normal scheduling (platform dependent)
 

Static Public Member Functions

static std::unique_ptr< IThreadImplCreateThreadImpl (std::thread::native_handle_type handle)
 

Protected Member Functions

 IThreadImpl (std::thread::native_handle_type handle)
 

Protected Attributes

std::thread::native_handle_type m_handle
 

Constructor & Destructor Documentation

◆ ~IThreadImpl()

virtual IThreadImpl::~IThreadImpl ( )
virtualdefault

◆ IThreadImpl()

IThreadImpl::IThreadImpl ( std::thread::native_handle_type handle)
inlineprotected

Member Function Documentation

◆ CreateThreadImpl()

std::unique_ptr< IThreadImpl > IThreadImpl::CreateThreadImpl ( std::thread::native_handle_type handle)
static

◆ RevertTask()

virtual bool IThreadImpl::RevertTask ( )
inlinevirtual

Revert the current thread to normal scheduling (platform dependent)

Returns
true for success, false for failure

Reimplemented in CThreadImplWin.

◆ SetPriority()

virtual bool IThreadImpl::SetPriority ( const ThreadPriority & priority)
pure virtual

Set the thread priority via the native threading library.

Implemented in CThreadImplLinux, CThreadImplPosix, and CThreadImplWin.

◆ SetTask()

virtual bool IThreadImpl::SetTask ( const ThreadTask & task)
inlinevirtual

Assign the current thread a task for OS scheduling (platform dependent)

Parameters
[in]taskType of task
Returns
true for success, false for failure

Reimplemented in CThreadImplWin.

◆ SetThreadInfo()

virtual void IThreadImpl::SetThreadInfo ( const std::string & name)
pure virtual

Set the thread name and other info (platform dependent)

Implemented in CThreadImplLinux, CThreadImplPosix, and CThreadImplWin.

Member Data Documentation

◆ m_handle

std::thread::native_handle_type IThreadImpl::m_handle
protected

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