Very Simple Cross-Platform Library
Public Member Functions | Static Public Member Functions | List of all members
hu::varadiistvan::scpl::Thread Class Referenceabstract

#include <Thread.h>

Public Member Functions

 Thread (bool detached=false)
 
virtual ~Thread ()
 
bool start ()
 
virtual void run ()=0
 
void join ()
 

Static Public Member Functions

static void sleep (unsigned millis)
 

Detailed Description

A thread

Definition at line 45 of file Thread.h.

Constructor & Destructor Documentation

◆ Thread()

hu::varadiistvan::scpl::Thread::Thread ( bool  detached = false)

Construct the thread.

Parameters
detachedif true, the thread will be created as a detached one, i.e. it can't be joined later on. The thread object will also be deleted when its run() function has finished.

◆ ~Thread()

virtual hu::varadiistvan::scpl::Thread::~Thread ( )
virtual

Virtual destructor.

Member Function Documentation

◆ join()

void hu::varadiistvan::scpl::Thread::join ( )

Wait for the thread to quit.

◆ run()

virtual void hu::varadiistvan::scpl::Thread::run ( )
pure virtual

Perform the thread's real operation. To be implemented in children

◆ sleep()

static void hu::varadiistvan::scpl::Thread::sleep ( unsigned  millis)
static

Sleep for the given number of milliseconds.

◆ start()

bool hu::varadiistvan::scpl::Thread::start ( )

Start the thread.

Returns
if the thread could be started

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