21 return detail::portable_thread_control::configure(current, config);
29 return detail::portable_thread_control::set_priority(current, level);
37 return detail::portable_thread_control::set_nice(current, value);
41[[nodiscard]]
inline auto
49[[nodiscard]]
inline auto
64[[nodiscard]]
inline auto
75 return detail::portable_thread_control::set_affinity(current, affinity);
79[[nodiscard]]
inline auto
Lightweight handle for querying and controlling a specific OS thread.
auto get_name() const -> expected< std::string, std::error_code >
auto set_name(std::string const &name) const -> expected< void, std::error_code >
Strongly-typed nice value in the POSIX range $[-20, 19]$.
Portable thread configuration bundle.
auto read_effective_nice(NativeHandle handle, native_thread_id tid) -> expected< int, std::error_code >
auto current_native_thread_id() noexcept -> native_thread_id
auto get_nice() -> result< nice_value >
Query current nice value of the calling thread.
auto set_name(std::string const &name) -> result< void >
Set the calling thread name.
auto get_affinity() -> result< thread_affinity >
Query CPU affinity of the calling thread.
auto configure(thread_config const &config) -> result< void >
Apply full portable configuration to the calling thread.
auto get_priority() -> result< priority_level >
Query current portable priority preset of the calling thread.
auto set_nice(nice_value value) -> result< void >
Set explicit nice value for the calling thread.
auto set_priority(priority_level level) -> result< void >
Set portable priority preset for the calling thread.
auto set_affinity(thread_affinity const &affinity) -> result< void >
Set CPU affinity for the calling thread.
auto get_name() -> result< std::string >
Query the calling thread name.
priority_level
Portable non-realtime priority levels.
C++17 thread wrappers and non-owning views.
Portable thread startup and runtime configuration.