|
ThreadSchedule 1.0.0
Modern C++ thread management library
|
RAII wrapper for pthread_attr_t with a builder-style API.
More...
#include <pthread_wrapper.hpp>
Public Member Functions | |
| PThreadAttributes (PThreadAttributes const &)=delete | |
| auto | operator= (PThreadAttributes const &) -> PThreadAttributes &=delete |
| PThreadAttributes (PThreadAttributes &&other) noexcept | |
| auto | operator= (PThreadAttributes &&other) noexcept -> PThreadAttributes & |
| auto | get () const -> pthread_attr_t const & |
| auto | get () -> pthread_attr_t & |
| auto | set_detach_state (bool detached) -> bool |
| auto | set_stack_size (size_t stack_size) -> bool |
| auto | set_guard_size (size_t guard_size) -> bool |
| auto | set_scheduling_policy (SchedulingPolicy policy) -> bool |
| auto | set_scheduling_parameter (ThreadPriority priority) -> bool |
| auto | set_inherit_sched (bool inherit) -> bool |
| auto | set_scope (bool system_scope) -> bool |
| auto | get_detach_state () const -> std::optional< bool > |
| auto | get_stack_size () const -> std::optional< size_t > |
| auto | get_guard_size () const -> std::optional< size_t > |
RAII wrapper for pthread_attr_t with a builder-style API.
Non-copyable, movable. The move constructor and move assignment operator call std::terminate if the re-initialisation of the moved-from attribute object fails (cannot throw from noexcept).
The destructor always calls pthread_attr_destroy.
Provides fluent setters for detach state, stack size, guard size, scheduling policy, priority, inherit-sched, and contention scope.
Definition at line 306 of file pthread_wrapper.hpp.
|
inline |
Definition at line 309 of file pthread_wrapper.hpp.
|
inline |
Definition at line 317 of file pthread_wrapper.hpp.
|
inlinenoexcept |
Definition at line 327 of file pthread_wrapper.hpp.
|
inline |
Definition at line 353 of file pthread_wrapper.hpp.
|
inlinenodiscard |
Definition at line 349 of file pthread_wrapper.hpp.
|
inlinenodiscard |
Definition at line 401 of file pthread_wrapper.hpp.
|
inlinenodiscard |
Definition at line 421 of file pthread_wrapper.hpp.
|
inlinenodiscard |
Definition at line 411 of file pthread_wrapper.hpp.
|
inlinenoexcept |
Definition at line 335 of file pthread_wrapper.hpp.
|
inline |
Definition at line 359 of file pthread_wrapper.hpp.
|
inline |
Definition at line 370 of file pthread_wrapper.hpp.
|
inline |
Definition at line 388 of file pthread_wrapper.hpp.
|
inline |
Definition at line 381 of file pthread_wrapper.hpp.
|
inline |
Definition at line 375 of file pthread_wrapper.hpp.
|
inline |
Definition at line 394 of file pthread_wrapper.hpp.
|
inline |
Definition at line 365 of file pthread_wrapper.hpp.