ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::this_thread Namespace Reference

Portable configuration operations for the calling thread. More...

Functions

auto configure (thread_config const &config) -> result< void >
 Apply full portable configuration to the calling thread.
 
auto set_priority (priority_level level) -> result< void >
 Set portable priority preset for the calling thread.
 
auto set_nice (nice_value value) -> result< void >
 Set explicit nice value for the calling thread.
 
auto get_priority () -> result< priority_level >
 Query current portable priority preset of the calling thread.
 
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_name () -> result< std::string >
 Query the calling thread name.
 
auto set_affinity (thread_affinity const &affinity) -> result< void >
 Set CPU affinity for the calling thread.
 
auto get_affinity () -> result< thread_affinity >
 Query CPU affinity of the calling thread.
 

Detailed Description

Portable configuration operations for the calling thread.

Function Documentation

◆ configure()

auto threadschedule::this_thread::configure ( thread_config const &  config) -> result<void>
inline

Apply full portable configuration to the calling thread.

Definition at line 18 of file this_thread.hpp.

◆ get_affinity()

auto threadschedule::this_thread::get_affinity ( ) -> result<thread_affinity>
inline

Query CPU affinity of the calling thread.

Definition at line 80 of file this_thread.hpp.

References get_affinity().

Referenced by get_affinity().

◆ get_name()

auto threadschedule::this_thread::get_name ( ) -> result<std::string>
inline

Query the calling thread name.

Definition at line 65 of file this_thread.hpp.

References threadschedule::detail::thread_info::get_name().

◆ get_nice()

auto threadschedule::this_thread::get_nice ( ) -> result<nice_value>
inline

Query current nice value of the calling thread.

Definition at line 50 of file this_thread.hpp.

References threadschedule::detail::current_native_thread_id(), and threadschedule::detail::read_effective_nice().

◆ get_priority()

auto threadschedule::this_thread::get_priority ( ) -> result<priority_level>
inline

Query current portable priority preset of the calling thread.

Definition at line 42 of file this_thread.hpp.

References threadschedule::detail::current_native_thread_id(), and threadschedule::detail::read_effective_nice().

◆ set_affinity()

auto threadschedule::this_thread::set_affinity ( thread_affinity const &  affinity) -> result<void>
inline

Set CPU affinity for the calling thread.

Definition at line 72 of file this_thread.hpp.

◆ set_name()

auto threadschedule::this_thread::set_name ( std::string const &  name) -> result<void>
inline

Set the calling thread name.

Definition at line 58 of file this_thread.hpp.

References threadschedule::detail::thread_info::set_name().

◆ set_nice()

auto threadschedule::this_thread::set_nice ( nice_value  value) -> result<void>
inline

Set explicit nice value for the calling thread.

Definition at line 34 of file this_thread.hpp.

◆ set_priority()

auto threadschedule::this_thread::set_priority ( priority_level  level) -> result<void>
inline

Set portable priority preset for the calling thread.

Definition at line 26 of file this_thread.hpp.