|
ThreadSchedule 2.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 113 of file scheduler_policy.hpp.
|
inlineexplicitconstexpr |
Definition at line 116 of file scheduler_policy.hpp.
Referenced by highest(), lowest(), normal(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 137 of file scheduler_policy.hpp.
References ThreadPriority().
Referenced by threadschedule::profiles::realtime().
|
inlinenodiscardconstexprnoexcept |
Definition at line 124 of file scheduler_policy.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 129 of file scheduler_policy.hpp.
References ThreadPriority().
Referenced by threadschedule::profiles::background().
|
inlinestaticnodiscardconstexprnoexcept |
Definition at line 133 of file scheduler_policy.hpp.
References ThreadPriority().
Referenced by threadschedule::HighPerformancePool::configure_threads(), threadschedule::LightweightPoolT< TaskSize >::configure_threads(), threadschedule::PoolWithErrors< HighPerformancePool >::configure_threads(), threadschedule::ScheduledThreadPoolT< ThreadPool >::configure_threads(), threadschedule::ThreadPoolBase< IndefiniteWait >::configure_threads(), threadschedule::ChaosController::operator=(), and threadschedule::profiles::throughput().
|
inlinenodiscardconstexprnoexcept |
Definition at line 146 of file scheduler_policy.hpp.
References ThreadPriority().
|
inlinenodiscardconstexprnoexcept |
Definition at line 150 of file scheduler_policy.hpp.
References ThreadPriority().
|
inlinenodiscardconstexprnoexcept |
Definition at line 154 of file scheduler_policy.hpp.
References ThreadPriority().
|
inlinenodiscardconstexprnoexcept |
Definition at line 142 of file scheduler_policy.hpp.
References ThreadPriority().
|
inlinenodiscardconstexprnoexcept |
Definition at line 158 of file scheduler_policy.hpp.
References ThreadPriority().
|
inlinenodiscardconstexprnoexcept |
Definition at line 162 of file scheduler_policy.hpp.
References ThreadPriority().
|
inlinenodiscard |
Definition at line 167 of file scheduler_policy.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 120 of file scheduler_policy.hpp.
Referenced by threadschedule::SchedulerParams::create_for_policy().