|
| thread () noexcept=default |
|
template<typename F , typename... Args> |
| thread (F &&func, Args &&... args) |
|
template<typename A , typename F , typename ... Args, class = enable_if_attributes<A>> |
| thread (A &&attr, F &&func, Args &&... args) |
|
thread & | operator= (thread &&thread_) |
|
void | swap (thread &thread_) noexcept |
|
bool | joinable () const noexcept |
|
void | join () |
|
void | detach () |
|
| thread (thread &)=delete |
|
| thread (const thread &)=delete |
|
| thread (const thread &&)=delete |
|
thread & | operator= (const thread &)=delete |
|
std::thread::id | get_id () const noexcept |
|
Create a thread with thread attributes.
Create a thread optionally with thread attributes. The usage of this class follows the C++ standard for std::thread. The standard support for creating a thread does not let you control the attributes of a thread and control is important in embedded real-time applications. This class lets you control a thread attributes and use the extensive an excellent thread support the C++ standard provides.
There is no indication attribute support for threads will be added to the C++ standard and what it will look like. The support provided here is designed to make as little impact on a code base as possible. While the attributes supported are specific to RTEMS they are common to all embedded operating systems.
The support provided here is specific to GCC due to the use of some non-standard interfaces to get the indices of the template argument pack in new thread's context. A standards only solution would be preferred.