|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Portable thread configuration bundle. More...
#include <thread_config.hpp>
Public Member Functions | |
| thread_config ()=default | |
| auto | set_name (std::string name) -> thread_config & |
| Set thread name. | |
| auto | clear_name () noexcept -> thread_config & |
| Clear previously configured thread name. | |
| auto | set_scheduling (scheduling_config scheduling) noexcept -> thread_config & |
| Set scheduling configuration. | |
| auto | clear_scheduling () noexcept -> thread_config & |
| Clear previously configured scheduling request. | |
| auto | set_affinity (thread_affinity affinity) -> thread_config & |
| Set CPU affinity mask. | |
| auto | clear_affinity () noexcept -> thread_config & |
| Clear previously configured CPU affinity. | |
| auto | get_name () const noexcept -> std::optional< std::string > const & |
| Return configured thread name if present. | |
| auto | get_scheduling () const noexcept -> std::optional< scheduling_config > const & |
| Return configured scheduling request if present. | |
| auto | get_affinity () const noexcept -> std::optional< thread_affinity > const & |
| Return configured affinity set if present. | |
| auto | empty () const noexcept -> bool |
| Return whether no settings are currently configured. | |
Portable thread configuration bundle.
Instances can be reused across thread creation and runtime reconfiguration APIs. Any unset field is ignored when applied.
Definition at line 24 of file thread_config.hpp.
|
default |
|
inlinenoexcept |
Clear previously configured CPU affinity.
Definition at line 80 of file thread_config.hpp.
|
inlinenoexcept |
Clear previously configured thread name.
Definition at line 42 of file thread_config.hpp.
|
inlinenoexcept |
Clear previously configured scheduling request.
Definition at line 61 of file thread_config.hpp.
|
inlinenoexcept |
Return whether no settings are currently configured.
Definition at line 106 of file thread_config.hpp.
|
inlinenoexcept |
Return configured affinity set if present.
Definition at line 100 of file thread_config.hpp.
|
inlinenoexcept |
Return configured thread name if present.
Definition at line 88 of file thread_config.hpp.
|
inlinenoexcept |
Return configured scheduling request if present.
Definition at line 94 of file thread_config.hpp.
|
inline |
Set CPU affinity mask.
| affinity | Normalized affinity set. |
Definition at line 72 of file thread_config.hpp.
Referenced by threadschedule::advanced::profile_detail::make_config().
|
inline |
Set thread name.
| name | User-visible thread name. |
Definition at line 34 of file thread_config.hpp.
Referenced by threadschedule::advanced::apply_profile_detailed(), and threadschedule::advanced::profile_detail::make_config().
|
inlinenoexcept |
Set scheduling configuration.
| scheduling | Portable scheduling request. |
Definition at line 53 of file thread_config.hpp.