µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.
os::estd::thread Class Reference

Standard thread. More...

Classes

class  id
 Thread unique id. More...
 

Public Types

using native_handle_type = os::rtos::thread *
 

Public Member Functions

 thread () noexcept=default
 
template<typename F , typename ... Args>
 thread (F &&f, Args &&... args)
 
 thread (const thread &)=delete
 
 thread (thread &&t) noexcept
 
 ~thread ()
 
void detach (void)
 
void join (void)
 
bool joinable (void) const noexcept
 
threadoperator= (const thread &)=delete
 
threadoperator= (thread &&t) noexcept
 
void swap (thread &t) noexcept
 

Private Types

using function_object_deleter_t = void(*)(void *)
 

Private Member Functions

void delete_system_thread (void)
 

Private Attributes

function_object_deleter_t function_object_deleter_ = nullptr
 
id id_
 
id get_id (void) const noexcept
 
native_handle_type native_handle ()
 
static unsigned hardware_concurrency (void) noexcept
 
template<typename F_T >
static void run_function_object (const void *func_object)
 
template<typename F_T >
static void delete_function_object (const void *func_obj)
 

Detailed Description

Standard thread.

Definition at line 47 of file thread.

Types

◆ function_object_deleter_t

using os::estd::thread::function_object_deleter_t = void (*) (void*)
private

Definition at line 157 of file thread.

◆ native_handle_type

Definition at line 51 of file thread.

Constructor & Destructor Documentation

◆ thread() [1/4]

os::estd::thread::thread ( )
defaultnoexcept

◆ thread() [2/4]

template<typename F , typename ... Args>
os::estd::thread::thread ( F &&  f,
Args &&...  args 
)
explicit

◆ ~thread()

thread::~thread ( )

Definition at line 75 of file thread.cpp.

◆ thread() [3/4]

os::estd::thread::thread ( const thread )
delete

◆ thread() [4/4]

thread::thread ( thread &&  t)
noexcept

Definition at line 40 of file thread.cpp.

Member Function Documentation

◆ delete_function_object()

template<typename F_T >
void thread::delete_function_object ( const void *  func_obj)
staticprivate

Definition at line 341 of file thread.

◆ delete_system_thread()

void thread::delete_system_thread ( void  )
private

Definition at line 59 of file thread.cpp.

◆ detach()

void thread::detach ( void  )

Definition at line 115 of file thread.cpp.

◆ get_id()

thread::id thread::get_id ( void  ) const
inlinenoexcept

Definition at line 311 of file thread.

◆ hardware_concurrency()

unsigned thread::hardware_concurrency ( void  )
inlinestaticnoexcept

Definition at line 323 of file thread.

◆ join()

void thread::join ( void  )

Definition at line 104 of file thread.cpp.

◆ joinable()

bool thread::joinable ( void  ) const
noexcept

Definition at line 98 of file thread.cpp.

◆ native_handle()

thread::native_handle_type thread::native_handle ( )
inline

Definition at line 317 of file thread.

◆ operator=() [1/2]

thread& os::estd::thread::operator= ( const thread )
delete

◆ operator=() [2/2]

thread & thread::operator= ( thread &&  t)
noexcept

Definition at line 46 of file thread.cpp.

◆ run_function_object()

template<typename F_T >
void thread::run_function_object ( const void *  func_object)
staticprivate

Definition at line 330 of file thread.

◆ swap()

void thread::swap ( thread t)
noexcept

Definition at line 91 of file thread.cpp.

Member Data Documentation

◆ function_object_deleter_

function_object_deleter_t os::estd::thread::function_object_deleter_ = nullptr
private

Definition at line 158 of file thread.

◆ id_

id os::estd::thread::id_
private

Definition at line 155 of file thread.


The documentation for this class was generated from the following files: