|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Non-owning view over a running thread or jthread. More...
#include <thread_view.hpp>
Public Member Functions | |
| thread_view (std::thread &value) noexcept | |
| Create a view over an existing std::thread. | |
| thread_view (thread &value) noexcept | |
| Create a view over a threadschedule::thread. | |
| auto | joinable () const noexcept -> bool |
| Return whether viewed thread is joinable. | |
| auto | get_id () const noexcept -> std::thread::id |
| Return std::thread id of viewed thread. | |
| auto | configure (thread_config const &config) -> result< void > |
| Apply full portable configuration to viewed thread. | |
| auto | set_priority (priority_level level) -> result< void > |
| Set portable priority preset on viewed thread. | |
| auto | set_nice (nice_value value) -> result< void > |
| Set explicit nice value on viewed thread. | |
| auto | get_priority () const -> result< priority_level > |
| Query portable priority preset of viewed thread. | |
| auto | get_nice () const -> result< nice_value > |
| Query nice value of viewed thread. | |
| auto | set_name (std::string const &name) -> result< void > |
| Set viewed thread name. | |
| auto | get_name () const -> result< std::string > |
| Query viewed thread name. | |
| auto | set_affinity (thread_affinity const &affinity) -> result< void > |
| Set viewed thread CPU affinity. | |
| auto | get_affinity () const -> result< thread_affinity > |
| Query viewed thread CPU affinity. | |
Non-owning view over a running thread or jthread.
This class never joins/detaches and only forwards control/query operations.
Definition at line 29 of file thread_view.hpp.
|
inlineexplicitnoexcept |
Create a view over an existing std::thread.
operation_not_supported because an external thread's kernel TID cannot be recovered portably. Definition at line 100 of file thread_view.hpp.
|
inlineexplicitnoexcept |
Create a view over a threadschedule::thread.
Definition at line 102 of file thread_view.hpp.
|
inline |
Apply full portable configuration to viewed thread.
Definition at line 121 of file thread_view.hpp.
|
inline |
Query viewed thread CPU affinity.
Definition at line 179 of file thread_view.hpp.
|
inlinenoexcept |
Return std::thread id of viewed thread.
Definition at line 114 of file thread_view.hpp.
|
inline |
Query viewed thread name.
Definition at line 165 of file thread_view.hpp.
|
inline |
Query nice value of viewed thread.
Definition at line 150 of file thread_view.hpp.
|
inline |
Query portable priority preset of viewed thread.
Definition at line 142 of file thread_view.hpp.
|
inlinenoexcept |
Return whether viewed thread is joinable.
Definition at line 107 of file thread_view.hpp.
|
inline |
Set viewed thread CPU affinity.
Definition at line 172 of file thread_view.hpp.
|
inline |
Set viewed thread name.
Definition at line 158 of file thread_view.hpp.
|
inline |
Set explicit nice value on viewed thread.
Definition at line 135 of file thread_view.hpp.
|
inline |
Set portable priority preset on viewed thread.
Definition at line 128 of file thread_view.hpp.