|
ThreadSchedule 1.0.0
Modern C++ thread management library
|
PThreadWrapper with automatic registration in the global ThreadRegistry. More...
#include <registered_threads.hpp>
Public Member Functions | |
| PThreadWrapperReg (PThreadWrapperReg &&) noexcept=default | |
| auto | operator= (PThreadWrapperReg &&) noexcept -> PThreadWrapperReg &=default |
| PThreadWrapperReg (PThreadWrapperReg const &)=delete | |
| auto | operator= (PThreadWrapperReg const &) -> PThreadWrapperReg &=delete |
| template<typename F, typename... Args> | |
| PThreadWrapperReg (std::string name, std::string componentTag, F &&f, Args &&... args) | |
| Public Member Functions inherited from threadschedule::PThreadWrapper | |
| template<typename F, typename... Args> | |
| PThreadWrapper (F &&func, Args &&... args) | |
| PThreadWrapper (PThreadWrapper const &)=delete | |
| auto | operator= (PThreadWrapper const &) -> PThreadWrapper &=delete |
| PThreadWrapper (PThreadWrapper &&other) noexcept | |
| auto | operator= (PThreadWrapper &&other) noexcept -> PThreadWrapper & |
| void | join () |
| void | detach () |
| auto | joinable () const -> bool |
| auto | get_id () const -> id |
| auto | native_handle () const -> native_handle_type |
| auto | set_name (std::string const &name) const -> expected< void, std::error_code > |
| auto | get_name () const -> std::optional< std::string > |
| auto | set_priority (ThreadPriority priority) const -> expected< void, std::error_code > |
| auto | set_scheduling_policy (SchedulingPolicy policy, ThreadPriority priority) const -> expected< void, std::error_code > |
| auto | set_affinity (ThreadAffinity const &affinity) const -> expected< void, std::error_code > |
| auto | get_affinity () const -> std::optional< ThreadAffinity > |
| auto | cancel () const -> expected< void, std::error_code > |
Additional Inherited Members | |
| Public Types inherited from threadschedule::PThreadWrapper | |
| using | native_handle_type = pthread_t |
| using | id = pthread_t |
| Static Public Member Functions inherited from threadschedule::PThreadWrapper | |
| static auto | set_cancel_state (bool enabled) -> expected< void, std::error_code > |
| static auto | set_cancel_type (bool asynchronous) -> expected< void, std::error_code > |
| template<typename F, typename... Args> | |
| static auto | create_with_config (std::string const &name, SchedulingPolicy policy, ThreadPriority priority, F &&f, Args &&... args) -> PThreadWrapper |
| template<typename F, typename... Args> | |
| static auto | create_with_attributes (pthread_attr_t const &attr, F &&func, Args &&... args) -> PThreadWrapper |
PThreadWrapper with automatic registration in the global ThreadRegistry.
Non-copyable, movable. Linux-only (guarded by _WIN32). Same auto-register / auto-unregister semantics as ThreadWrapperReg, but for POSIX threads.
Definition at line 96 of file registered_threads.hpp.
|
inlineexplicit |
Definition at line 108 of file registered_threads.hpp.