#include <thread.h>
◆ Thread()
Thread::Thread |
( |
const std::string & | name = "" | ) |
|
◆ ~Thread()
◆ bindToProcessor()
bool Thread::bindToProcessor |
( |
unsigned int | proc_number | ) |
|
◆ getCurrentThread()
Thread * Thread::getCurrentThread |
( |
| ) |
|
|
static |
◆ getNumberOfProcessors()
unsigned int Thread::getNumberOfProcessors |
( |
| ) |
|
|
static |
◆ getReturnValue()
bool Thread::getReturnValue |
( |
void ** | ret | ) |
|
◆ getThreadHandle()
std::thread::native_handle_type Thread::getThreadHandle |
( |
| ) |
|
|
inlineprivate |
◆ getThreadId()
std::thread::id Thread::getThreadId |
( |
| ) |
|
|
inline |
◆ isCurrentThread()
bool Thread::isCurrentThread |
( |
| ) |
|
|
inline |
◆ isRunning()
bool Thread::isRunning |
( |
| ) |
|
|
inline |
◆ run()
virtual void * Thread::run |
( |
| ) |
|
|
protectedpure virtual |
Implemented in AsyncWorkerThread, AtomicTestThread, con::ConnectionReceiveThread, con::ConnectionSendThread, CurlFetchThread, EmergeThread, LambdaThread, ServerThread, SimpleTestThread, sound::OpenALSoundManager, TerminalChatConsole, TLSTestThread, and UpdateThread.
Referenced by threadProc().
◆ setName()
void Thread::setName |
( |
const std::string & | name | ) |
|
|
static |
◆ setPriority()
bool Thread::setPriority |
( |
int | prio | ) |
|
◆ start()
References m_joinable, m_mutex, m_request_stop, m_running, m_start_finished_mutex, m_thread_obj, sleep_ms, and threadProc().
Referenced by Minimap::Minimap(), sound::ProxySoundManager::ProxySoundManager(), AsyncEngine::addWorkerThread(), run_dedicated_server(), Server::start(), TestThreading::testStartStopWait(), and TestThreading::testTLS().
◆ stop()
◆ stopRequested()
bool Thread::stopRequested |
( |
| ) |
|
|
inline |
◆ threadProc()
void Thread::threadProc |
( |
Thread * | thr | ) |
|
|
staticprivate |
◆ wait()
References m_joinable, m_mutex, m_running, and m_thread_obj.
Referenced by EmergeManager::~EmergeManager(), Minimap::~Minimap(), sound::ProxySoundManager::~ProxySoundManager(), ~Thread(), run_dedicated_server(), Server::stop(), TestThreading::testStartStopWait(), and TestThreading::testTLS().
◆ m_joinable
bool Thread::m_joinable = false |
|
private |
◆ m_mutex
std::mutex Thread::m_mutex |
|
private |
◆ m_name
std::string Thread::m_name |
|
protected |
◆ m_request_stop
std::atomic<bool> Thread::m_request_stop |
|
private |
◆ m_retval
void* Thread::m_retval = nullptr |
|
private |
◆ m_running
std::atomic<bool> Thread::m_running |
|
private |
◆ m_start_finished_mutex
std::mutex Thread::m_start_finished_mutex |
|
private |
◆ m_thread_obj
std::thread* Thread::m_thread_obj = nullptr |
|
private |
The documentation for this class was generated from the following files: