kodi
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CThread Class Reference

Inherited by ActiveAE::CActiveAE [private], ActiveAE::CActiveAESink [private], ADDON::CAddonStatusHandler [private], ANNOUNCEMENT::CAnnouncementManager, CAirPlayServer, CAirTunesServer, CAlarmClock, CBackgroundPicLoader, CBusyWaiter, CDVDRadioRDSData, CDVDTeletextData, CExternalPlayer, CFDEventMonitor [private], CGUIDialogCache, CGUIDialogKeyboardTouch, CIRServerSuite, CJobWorker, CLanguageInvokerThread [protected], CLibInputHandler [private], CLirc [private], CRssReader, CTestBitstreamStatsThread, CTestStopWatchThread, CTimer [protected], CUdpClient [private], CVideoInfoDownloader, CVideoPlayer, CVideoPlayerAudio, CVideoPlayerAudioID3 [private], CVideoPlayerVideo, CVideoReferenceClock [private], CWHelper, CWin32PowerStateWorker, CWinEventsAndroid, CWinEventsOSX, CWinEventsTVOS, CZeroconfMDNS, EVENTSERVER::CEventServer [private], JSONRPC::CTCPServer, KODI::GAME::CControllerInstaller, KODI::GAME::CControllerSelect, KODI::GAME::CGUIConfigurationWizard [protected], KODI::GAME::CGUIDialogButtonCapture [protected], KODI::JOYSTICK::CGUIDialogNewJoystick [protected], KODI::JOYSTICK::CRumbleGenerator, KODI::MESSAGING::CDelayedMessage, KODI::RETRO::CGameLoop [protected], KODI::RETRO::CRetroPlayerAutoSave [protected], MUSIC_GRABBER::CMusicInfoScraper, PAPlayer, PERIPHERALS::CEventScanner [protected], PERIPHERALS::CPeripheralBus [protected], PVR::CPVREpgContainer [private], PVR::CPVRGUIInfo [private], PVR::CPVRGUIProgressHandler [private], PVR::CPVRManager [private], PVR::CPVRRefreshTimelineItemsThread, PVR::CPVRTimers [private], UPNP::CUPnPPlayer, VAAPI::COutput [private], VDPAU::CMixer [private], VDPAU::COutput [private], WSDiscovery::CWSDiscoveryListenerUDP, XFILE::CFileCache, and XFILE::CShoutcastFile.

Public Member Functions

 CThread (IRunnable *pRunnable, const char *ThreadName)
 
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.
 
virtual void OnException ()
 

Static Public Member Functions

static const std::thread::id GetCurrentThreadId ()
 
static CThreadGetCurrentThread ()
 

Protected Types

enum  WaitResponse { WAIT_INTERRUPTED = -1, WAIT_SIGNALED = 0, WAIT_TIMEDOUT = 1 }
 

Protected Member Functions

 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
virtual void Process ()
 
WaitResponse AbortableWait (CEvent &event, std::chrono::milliseconds duration=std::chrono::milliseconds(-1))
 This call will wait on a CEvent in an interruptible way such that if stop is called on the thread the wait will return with a response indicating what happened.
 

Protected Attributes

std::atomic< bool > m_bStop
 

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