Sese Framework
x.y.z
A cross-platform framework
|
线程类 更多...
#include <Thread.h>
类 | |
struct | RuntimeData |
线程运行数据 更多... | |
Public 类型 | |
using | Ptr = std::unique_ptr<Thread> |
Public 成员函数 | |
Thread (const std::function< void()> &function, const std::string &name=THREAD_DEFAULT_NAME) | |
Thread (Thread &thread) | |
void | start () |
void | join () |
void | detach () |
bool | joinable () const |
tid_t | getTid () const noexcept |
const std::string & | getThreadName () const noexcept |
Public 成员函数 继承自 sese::Noncopyable | |
Noncopyable ()=default | |
virtual | ~Noncopyable ()=default |
Noncopyable (const Noncopyable &)=delete | |
删除拷贝相关构造函数 | |
Noncopyable & | operator= (const Noncopyable &)=delete |
删除拷贝相关构造函数 | |
静态 Public 成员函数 | |
static void | run (std::shared_ptr< RuntimeData > data) |
static tid_t | getCurrentThreadId () noexcept |
static const char * | getCurrentThreadName () noexcept |
static void | setCurrentThreadAsMain () noexcept |
static tid_t | getMainThreadId () noexcept |
static Thread::RuntimeData * | getCurrentThreadData () noexcept |
Private 属性 | |
std::shared_ptr< RuntimeData > | data = nullptr |
静态 Private 属性 | |
static tid_t | main_id = 0 |
线程类
using sese::Thread::Ptr = std::unique_ptr<Thread> |
|
explicit |
引用了 data.
void sese::Thread::detach | ( | ) |
引用了 data.
|
staticnoexcept |
|
staticnoexcept |
引用了 sese::current_data, getTid() , 以及 sese::Thread::RuntimeData::id.
被这些函数引用 sese::record::LogHelper::l() , 以及 sese::record::LogHelper::log().
|
staticnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
被这些函数引用 getCurrentThreadId(), getCurrentThreadName(), run() , 以及 setCurrentThreadAsMain().
void sese::Thread::join | ( | ) |
引用了 data.
被这些函数引用 sese::Timer::shutdown().
|
nodiscard |
引用了 data.
|
static |
引用了 sese::current_data, data, sese::Thread::RuntimeData::function, getTid() , 以及 sese::Thread::RuntimeData::id.
被这些函数引用 start().
|
staticnoexcept |
被这些函数引用 sese::ThreadInitiateTask::init().
|
private |
|
staticprivate |
被这些函数引用 getCurrentThreadName(), getMainThreadId() , 以及 setCurrentThreadAsMain().