Thread class.
More...
#include <Thread.h>
◆ Ptr
◆ Thread() [1/2]
sese::Thread::Thread |
( |
const std::function< void()> & | function, |
|
|
const std::string & | name = THREAD_DEFAULT_NAME ) |
|
explicit |
◆ Thread() [2/2]
sese::Thread::Thread |
( |
Thread & | thread | ) |
|
◆ ~Thread()
sese::Thread::~Thread |
( |
| ) |
|
|
override |
◆ detach()
void sese::Thread::detach |
( |
| ) |
const |
◆ getCurrentThreadData()
Get the current thread instance.
- Returns
- The current thread instance, returns nullptr if the current thread is the main thread
References sese::current_data.
◆ getCurrentThreadId()
tid_t sese::Thread::getCurrentThreadId |
( |
| ) |
|
|
staticnoexcept |
◆ getCurrentThreadName()
const char * sese::Thread::getCurrentThreadName |
( |
| ) |
|
|
staticnoexcept |
◆ getMainThreadId()
tid_t sese::Thread::getMainThreadId |
( |
| ) |
|
|
staticnoexcept |
◆ getThreadName()
const std::string & sese::Thread::getThreadName |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ getTid()
tid_t sese::Thread::getTid |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ join()
void sese::Thread::join |
( |
| ) |
const |
◆ joinable()
bool sese::Thread::joinable |
( |
| ) |
const |
|
nodiscard |
◆ run()
void sese::Thread::run |
( |
std::shared_ptr< RuntimeData > | data | ) |
|
|
static |
◆ setCurrentThreadAsMain()
void sese::Thread::setCurrentThreadAsMain |
( |
| ) |
|
|
staticnoexcept |
◆ start()
void sese::Thread::start |
( |
| ) |
const |
◆ data
std::shared_ptr<RuntimeData> sese::Thread::data = nullptr |
|
private |
◆ main_id
tid_t sese::Thread::main_id = 0 |
|
staticprivate |
The documentation for this class was generated from the following files: