|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Non-owning view over an externally managed std::thread. More...
#include <thread_backend.hpp>
Public Member Functions | |
| thread_view_backend (std::thread &t) | |
| thread_view_backend (std::thread &t, native_thread_id tid) | |
| auto | get () noexcept -> std::thread & |
| auto | get () const noexcept -> std::thread const & |
Public Member Functions inherited from threadschedule::detail::basic_thread_backend< std::thread, detail::non_owning_tag > | |
| basic_thread_backend ()=default | |
| basic_thread_backend (std::thread &t) | |
| basic_thread_backend (std::thread &t, native_thread_id tid) | |
| virtual | ~basic_thread_backend ()=default |
| void | join () |
| void | detach () |
| auto | joinable () const noexcept -> bool |
| auto | get_id () const noexcept -> id |
| auto | native_handle () noexcept -> native_handle_type |
| auto | set_name (std::string const &name) -> expected< void, std::error_code > |
| auto | get_name () const -> expected< std::string, std::error_code > |
| auto | set_priority (native_thread_priority priority) -> expected< void, std::error_code > |
| auto | set_scheduling_policy (native_scheduling_policy policy, native_thread_priority priority) -> expected< void, std::error_code > |
| auto | configure (native_scheduling_config const &config) -> expected< void, std::error_code > |
| auto | configure (native_thread_config const &config) -> expected< void, std::error_code > |
| auto | set_nice_value (int nice_value) -> expected< void, std::error_code > |
| auto | get_nice_value () const -> expected< int, std::error_code > |
| auto | set_affinity (native_thread_affinity const &affinity) -> expected< void, std::error_code > |
| auto | get_affinity () const -> expected< native_thread_affinity, std::error_code > |
| auto | native_id () const noexcept -> native_thread_id |
Additional Inherited Members | |
Public Types inherited from threadschedule::detail::basic_thread_backend< std::thread, detail::non_owning_tag > | |
| using | native_handle_type = typename ThreadType::native_handle_type |
| using | id = typename ThreadType::id |
Protected Member Functions inherited from threadschedule::detail::basic_thread_backend< std::thread, detail::non_owning_tag > | |
| void | set_native_id (native_thread_id tid) noexcept |
Static Protected Member Functions inherited from threadschedule::detail::basic_thread_backend< std::thread, detail::non_owning_tag > | |
| static auto | no_such_thread () -> unexpected< std::error_code > |
Protected Attributes inherited from threadschedule::detail::basic_thread_backend< std::thread, detail::non_owning_tag > | |
| native_thread_id | native_id_ |
Non-owning view over an externally managed std::thread.
Provides the full basic_thread_backend interface (naming, priority, affinity, etc.) without taking ownership of the thread. The destructor is trivial - it does not join or detach.
std::thread must outlive this view. If the thread object is destroyed or moved while a view still references it, all subsequent operations through the view invoke undefined behavior.Definition at line 597 of file thread_backend.hpp.
|
inline |
Definition at line 600 of file thread_backend.hpp.
|
inline |
Definition at line 602 of file thread_backend.hpp.
|
inlinenoexcept |
Definition at line 614 of file thread_backend.hpp.
|
inlinenoexcept |
Definition at line 609 of file thread_backend.hpp.