|
ThreadSchedule 1.0.0
Modern C++ thread management library
|
Value-semantic wrapper for a thread scheduling priority. More...
#include <scheduler_policy.hpp>
Public Member Functions | |
| constexpr | ThreadPriority (int priority=0) |
| constexpr auto | value () const noexcept -> int |
| constexpr auto | is_valid () const noexcept -> bool |
| constexpr auto | operator== (ThreadPriority const &other) const noexcept -> bool |
| constexpr auto | operator!= (ThreadPriority const &other) const noexcept -> bool |
| constexpr auto | operator< (ThreadPriority const &other) const noexcept -> bool |
| constexpr auto | operator<= (ThreadPriority const &other) const noexcept -> bool |
| constexpr auto | operator> (ThreadPriority const &other) const noexcept -> bool |
| constexpr auto | operator>= (ThreadPriority const &other) const noexcept -> bool |
| auto | to_string () const -> std::string |
Static Public Member Functions | |
| static constexpr auto | lowest () noexcept -> ThreadPriority |
| static constexpr auto | normal () noexcept -> ThreadPriority |
| static constexpr auto | highest () noexcept -> ThreadPriority |
Value-semantic wrapper for a thread scheduling priority.
Encapsulates a single integer priority in the range [-20, 19] - the same range used by POSIX nice values on Linux. The value is silently clamped to this range on construction (via std::clamp), so out-of-range inputs never produce an invalid object.
Lower numeric values denote higher scheduling priority (following the Unix nice convention): -20 is the most favourable and 19 is the least.
Definition at line 106 of file scheduler_policy.hpp.
|
inlineexplicitconstexpr |
Definition at line 109 of file scheduler_policy.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 130 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 117 of file scheduler_policy.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 122 of file scheduler_policy.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 126 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 139 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 143 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 147 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 135 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 151 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 155 of file scheduler_policy.hpp.
|
inlinenodiscard |
Definition at line 160 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 113 of file scheduler_policy.hpp.