|
roo_threads
API Documentation for roo_threads
|
Canonical documentation-only thread API. More...
#include <thread_api.h>
Data Structures | |
| class | attributes |
| Optional thread attributes used by backend-specific constructors. More... | |
| class | id |
Public Member Functions | |
| thread () noexcept | |
| Constructs a non-joinable empty thread handle. | |
| thread (const thread &)=delete | |
| thread (thread &&other) noexcept | |
| Move-constructs a thread handle. | |
| template<typename Callable , typename... Args> | |
| thread (Callable &&callable, Args &&... args) | |
| Starts a new thread using default attributes. | |
| template<typename Callable , typename... Args> | |
| thread (const attributes &attrs, Callable &&callable, Args &&... args) | |
| Starts a new thread using explicit attributes. | |
| ~thread () | |
| Destroys the thread handle. | |
| thread & | operator= (const thread &)=delete |
| thread & | operator= (thread &&other) noexcept |
| Move-assigns a thread handle. | |
| void | swap (thread &other) noexcept |
| Swaps two thread handles. | |
| bool | joinable () const noexcept |
| Returns true if this handle represents an active thread. | |
| void | join () |
| Waits for the represented thread to complete. | |
| void | detach () |
| Detaches the represented thread from this handle. | |
| id | get_id () const noexcept |
| Returns identifier of the represented thread. | |
Canonical documentation-only thread API.
This type exists only to provide a single source of truth for API docs across backend-specific implementations selected via compile-time macros.
Definition at line 15 of file thread_api.h.
|
noexcept |
Constructs a non-joinable empty thread handle.
|
noexcept |
Move-constructs a thread handle.
| other | source thread handle. |
Starts a new thread using default attributes.
| Callable | callable type. |
| Args | argument types. |
| callable | callable object. |
| args | arguments passed to callable. |
|
explicit |
Starts a new thread using explicit attributes.
| Callable | callable type. |
| Args | argument types. |
| attrs | backend-specific thread attributes. |
| callable | callable object. |
| args | arguments passed to callable. |
| roo_threads::doc::thread::~thread | ( | ) |
Destroys the thread handle.
Backend-specific behavior applies if the thread is still joinable.
| void roo_threads::doc::thread::detach | ( | ) |
Detaches the represented thread from this handle.
|
noexcept |
Returns identifier of the represented thread.
| void roo_threads::doc::thread::join | ( | ) |
Waits for the represented thread to complete.
|
noexcept |
Returns true if this handle represents an active thread.
Move-assigns a thread handle.
| other | source thread handle. |
Swaps two thread handles.
| other | thread handle to swap with. |