Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::threads::Thread Class Reference

#include <Thread.hpp>

Collaboration diagram for iv::threads::Thread:
[legend]

Public Member Functions

 Thread ()=delete
 
 Thread (iv::threads::IRunnable **runnable, std::string_view threadName="")
 
 Thread (const Thread &other)=delete
 
 Thread (Thread &&other)=delete
 
 ~Thread ()
 
Thread operator= (const Thread &other)=delete
 
Thread operator= (Thread &&other)=delete
 
bool isRunning () const
 
bool isPaused () const
 
bool isStopped () const
 
std::thread::id getId ()
 
void startThread ()
 
void pauseThread () const
 
void resumeThread () const
 
void waitingForFinished ()
 

Private Types

enum class  eThreadState { Init , Running , WaitingForEnd , Stopped }
 

Private Member Functions

void prvRunThread () const
 

Static Private Member Functions

static void sigsegvHandler (int signo, siginfo_t *info, void *context)
 

Private Attributes

std::unique_ptr< std::thread > m_handleThread
 
iv::threads::IRunnablem_runnable
 
eThreadState m_state
 
std::string m_threadName
 
std::atomic< bool > m_hasCrashed
 

Member Enumeration Documentation

◆ eThreadState

enum class iv::threads::Thread::eThreadState
strongprivate
Enumerator
Init 
Running 
WaitingForEnd 
Stopped 

Constructor & Destructor Documentation

◆ Thread() [1/4]

iv::threads::Thread::Thread ( )
delete

◆ Thread() [2/4]

iv::threads::Thread::Thread ( iv::threads::IRunnable ** runnable,
std::string_view threadName = "" )
explicit

◆ Thread() [3/4]

iv::threads::Thread::Thread ( const Thread & other)
delete

◆ Thread() [4/4]

iv::threads::Thread::Thread ( Thread && other)
delete

◆ ~Thread()

iv::threads::Thread::~Thread ( )

Member Function Documentation

◆ getId()

std::thread::id iv::threads::Thread::getId ( )

◆ isPaused()

bool iv::threads::Thread::isPaused ( ) const
nodiscard

◆ isRunning()

bool iv::threads::Thread::isRunning ( ) const
nodiscard

◆ isStopped()

bool iv::threads::Thread::isStopped ( ) const
nodiscard

◆ operator=() [1/2]

Thread iv::threads::Thread::operator= ( const Thread & other)
delete

◆ operator=() [2/2]

Thread iv::threads::Thread::operator= ( Thread && other)
delete

◆ pauseThread()

void iv::threads::Thread::pauseThread ( ) const

◆ prvRunThread()

void iv::threads::Thread::prvRunThread ( ) const
private

◆ resumeThread()

void iv::threads::Thread::resumeThread ( ) const

◆ sigsegvHandler()

void iv::threads::Thread::sigsegvHandler ( int signo,
siginfo_t * info,
void * context )
staticprivate

◆ startThread()

void iv::threads::Thread::startThread ( )

◆ waitingForFinished()

void iv::threads::Thread::waitingForFinished ( )

Member Data Documentation

◆ m_handleThread

std::unique_ptr<std::thread> iv::threads::Thread::m_handleThread
private

◆ m_hasCrashed

std::atomic<bool> iv::threads::Thread::m_hasCrashed
private

◆ m_runnable

iv::threads::IRunnable* iv::threads::Thread::m_runnable
private

◆ m_state

eThreadState iv::threads::Thread::m_state
private

◆ m_threadName

std::string iv::threads::Thread::m_threadName
private

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