Base class for threads.
More...
#include <tdme/os/threading/Thread.h>
Base class for threads.
- Author
- Andreas Drewke
Definition at line 26 of file Thread.h.
◆ Thread()
Thread |
( |
const string & |
name, |
|
|
size_t |
stackSize = 2 * 1024 * 1024 |
|
) |
| |
Public constructor.
- Parameters
-
name | name |
stackSize | stack size, defaults to 2MB |
Definition at line 24 of file Thread.cpp.
◆ ~Thread()
Public destructor.
Definition at line 27 of file Thread.cpp.
◆ getHardwareThreadCount()
int getHardwareThreadCount |
( |
| ) |
|
|
static |
- Returns
- hardware thread count
Definition at line 30 of file Thread.cpp.
◆ isStopRequested()
Returns if stop has been requested.
- Returns
- bool
Definition at line 98 of file Thread.cpp.
◆ join()
Blocks caller thread until this thread has been terminated.
Definition at line 55 of file Thread.cpp.
◆ pThreadRun()
void * pThreadRun |
( |
void * |
thread | ) |
|
|
staticprivate |
◆ run()
◆ sleep()
void sleep |
( |
const uint64_t |
milliseconds | ) |
|
|
static |
sleeps current thread for given time in milliseconds
- Parameters
-
milliseconds | uint64_t milliseconds to wait |
Definition at line 34 of file Thread.cpp.
◆ start()
Starts this objects thread.
Definition at line 65 of file Thread.cpp.
◆ stop()
Requests that this thread should be stopped.
Definition at line 94 of file Thread.cpp.
◆ name
◆ pThread
◆ pThreadCreated
◆ stackSize
◆ stopRequested
volatile bool stopRequested |
|
private |
The documentation for this class was generated from the following files:
- /home/andreas/Development/drewke.net/tdme2/src/tdme/os/threading/Thread.h
- /home/andreas/Development/drewke.net/tdme2/src/tdme/os/threading/Thread.cpp