#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 | ) |
const |
◆ getThreadHandle()
| std::thread::native_handle_type Thread::getThreadHandle |
( |
| ) |
const |
|
inlineprivate |
◆ getThreadId()
| std::thread::id Thread::getThreadId |
( |
| ) |
const |
|
inline |
◆ isCurrentThread()
| bool Thread::isCurrentThread |
( |
| ) |
const |
|
inline |
◆ isRunning()
| bool Thread::isRunning |
( |
| ) |
const |
|
inline |
◆ run()
| virtual void * Thread::run |
( |
| ) |
|
|
protectedpure virtual |
Implemented in AsyncWorkerThread, AtomicTestThread, con::ConnectionReceiveThread, con::ConnectionSendThread, CurlFetchThread, EmergeThread, LambdaThread, ServerThread, SimpleTestThread, sound::OpenALSoundManager, SSCSMEnvironment, 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()
References m_request_stop.
Referenced by EmergeManager::~EmergeManager(), sound::ProxySoundManager::~ProxySoundManager(), SSCSMController::~SSCSMController(), EmergeThread::run(), run_dedicated_server(), Server::setAsyncFatalError(), Server::start(), Server::stop(), UpdateThread::stop(), TestThreading::testStartStopWait(), and TestThreading::testTLS().
◆ stopRequested()
| bool Thread::stopRequested |
( |
| ) |
const |
|
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(), SSCSMController::~SSCSMController(), ~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: