RAII pthread wrapper with modern C++ interface.
More...
#include <pthread_wrapper.hpp>
|
static auto | set_cancel_state (bool enabled) -> expected< void, std::error_code > |
static auto | set_cancel_type (bool asynchronous) -> expected< void, std::error_code > |
template<typename F, typename... Args> |
static auto | create_with_config (std::string const &name, SchedulingPolicy policy, ThreadPriority priority, F &&f, Args &&... args) -> PThreadWrapper |
template<typename F, typename... Args> |
static auto | create_with_attributes (pthread_attr_t const &attr, F &&func, Args &&... args) -> PThreadWrapper |
RAII pthread wrapper with modern C++ interface.
Definition at line 27 of file pthread_wrapper.hpp.
◆ id
using threadschedule::PThreadWrapper::id = pthread_t |
◆ native_handle_type
using threadschedule::PThreadWrapper::native_handle_type = pthread_t |
◆ PThreadWrapper() [1/3]
threadschedule::PThreadWrapper::PThreadWrapper |
( |
| ) |
|
|
inline |
◆ PThreadWrapper() [2/3]
template<typename F, typename... Args>
threadschedule::PThreadWrapper::PThreadWrapper |
( |
F && | func, |
|
|
Args &&... | args ) |
|
inlineexplicit |
◆ PThreadWrapper() [3/3]
threadschedule::PThreadWrapper::PThreadWrapper |
( |
PThreadWrapper && | other | ) |
|
|
inlinenoexcept |
◆ ~PThreadWrapper()
threadschedule::PThreadWrapper::~PThreadWrapper |
( |
| ) |
|
|
inline |
◆ cancel()
auto threadschedule::PThreadWrapper::cancel |
( |
| ) |
const -> expected<void, std::error_code>
|
|
inlinenodiscard |
◆ create_with_attributes()
template<typename F, typename... Args>
auto threadschedule::PThreadWrapper::create_with_attributes |
( |
pthread_attr_t const & | attr, |
|
|
F && | func, |
|
|
Args &&... | args ) -> PThreadWrapper
|
|
inlinestatic |
◆ create_with_config()
template<typename F, typename... Args>
auto threadschedule::PThreadWrapper::create_with_config |
( |
std::string const & | name, |
|
|
SchedulingPolicy | policy, |
|
|
ThreadPriority | priority, |
|
|
F && | f, |
|
|
Args &&... | args ) -> PThreadWrapper
|
|
inlinestatic |
◆ detach()
void threadschedule::PThreadWrapper::detach |
( |
| ) |
|
|
inline |
◆ get_affinity()
auto threadschedule::PThreadWrapper::get_affinity |
( |
| ) |
const -> std::optional<ThreadAffinity>
|
|
inlinenodiscard |
◆ get_id()
auto threadschedule::PThreadWrapper::get_id |
( |
| ) |
const -> id
|
|
inlinenodiscard |
◆ get_name()
auto threadschedule::PThreadWrapper::get_name |
( |
| ) |
const -> std::optional<std::string>
|
|
inlinenodiscard |
◆ join()
void threadschedule::PThreadWrapper::join |
( |
| ) |
|
|
inline |
◆ joinable()
auto threadschedule::PThreadWrapper::joinable |
( |
| ) |
const -> bool
|
|
inlinenodiscard |
◆ native_handle()
auto threadschedule::PThreadWrapper::native_handle |
( |
| ) |
const -> native_handle_type
|
|
inlinenodiscard |
◆ operator=()
◆ set_affinity()
auto threadschedule::PThreadWrapper::set_affinity |
( |
ThreadAffinity const & | affinity | ) |
const -> expected<void, std::error_code>
|
|
inlinenodiscard |
◆ set_cancel_state()
auto threadschedule::PThreadWrapper::set_cancel_state |
( |
bool | enabled | ) |
-> expected<void, std::error_code>
|
|
inlinestatic |
◆ set_cancel_type()
auto threadschedule::PThreadWrapper::set_cancel_type |
( |
bool | asynchronous | ) |
-> expected<void, std::error_code>
|
|
inlinestatic |
◆ set_name()
auto threadschedule::PThreadWrapper::set_name |
( |
std::string const & | name | ) |
const -> expected<void, std::error_code>
|
|
inlinenodiscard |
◆ set_priority()
auto threadschedule::PThreadWrapper::set_priority |
( |
ThreadPriority | priority | ) |
const -> expected<void, std::error_code>
|
|
inlinenodiscard |
◆ set_scheduling_policy()
auto threadschedule::PThreadWrapper::set_scheduling_policy |
( |
SchedulingPolicy | policy, |
|
|
ThreadPriority | priority ) const -> expected<void, std::error_code>
|
|
inlinenodiscard |
The documentation for this class was generated from the following file: