µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
thread Class Reference

Standard thread. More...

#include <thread_internal.h>

Classes

class  id
 Thread unique id. More...
 

Public Types

using native_handle_type = os::rtos::thread *
 

Public Member Functions

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

Static Public Member Functions

static unsigned hardware_concurrency (void) noexcept
 

Private Types

using function_object_deleter_t = void(*)(void *)
 

Private Member Functions

void delete_system_thread (void)
 

Static Private Member Functions

template<typename F_T >
static void delete_function_object (const void *func_obj)
 
template<typename F_T >
static void run_function_object (const void *func_object)
 

Private Attributes

function_object_deleter_t function_object_deleter_ = nullptr
 
id id_
 

Detailed Description

Standard thread.

Definition at line 40 of file thread_internal.h.

Member Typedef Documentation

◆ function_object_deleter_t

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

Definition at line 150 of file thread_internal.h.

◆ native_handle_type

Definition at line 44 of file thread_internal.h.

Constructor & Destructor Documentation

◆ thread() [1/5]

thread::thread ( )
defaultnoexcept

◆ thread() [2/5]

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

◆ ~thread()

thread::~thread ( )

Definition at line 52 of file thread-cpp.h.

◆ thread() [3/5]

thread::thread ( const thread )
delete

◆ thread() [4/5]

thread::thread ( thread &&  t)
noexcept

Definition at line 17 of file thread-cpp.h.

◆ thread() [5/5]

template<typename Callable_T , typename ... Args_T>
thread::thread ( Callable_T &&  f,
Args_T &&...  args 
)

Definition at line 351 of file thread_internal.h.

Member Function Documentation

◆ delete_function_object()

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

Definition at line 332 of file thread_internal.h.

◆ delete_system_thread()

void thread::delete_system_thread ( void  )
private

Definition at line 36 of file thread-cpp.h.

◆ detach()

void thread::detach ( void  )

Definition at line 92 of file thread-cpp.h.

◆ get_id()

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

Definition at line 302 of file thread_internal.h.

◆ hardware_concurrency()

unsigned thread::hardware_concurrency ( void  )
inlinestaticnoexcept

Definition at line 314 of file thread_internal.h.

◆ join()

void thread::join ( void  )

Definition at line 81 of file thread-cpp.h.

◆ joinable()

bool thread::joinable ( void  ) const
noexcept

Definition at line 75 of file thread-cpp.h.

◆ native_handle()

thread::native_handle_type thread::native_handle ( )
inline

Definition at line 308 of file thread_internal.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 23 of file thread-cpp.h.

◆ run_function_object()

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

Definition at line 321 of file thread_internal.h.

◆ swap()

void thread::swap ( thread t)
noexcept

Definition at line 68 of file thread-cpp.h.

Member Data Documentation

◆ function_object_deleter_

function_object_deleter_t thread::function_object_deleter_ = nullptr
private

Definition at line 151 of file thread_internal.h.

◆ id_

id thread::id_
private

Definition at line 148 of file thread_internal.h.


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