libjmmcg
build_2783
A C++ library containing an eclectic mix of useful, advanced components.
|
This class of threads is used within the various thread_pool classes. More...
#include <pool_thread.hpp>
Public Types | |
using | base_t = ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, typename OST::thread_traits::model_type > |
using | os_traits = OST |
using | model_type = typename OST::thread_traits::model_type |
using | exit_requested_type = ExitReq |
The exit event type. More... | |
Public Types inherited from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type > | |
typedef thread_os_traits< API, OST::thread_traits::model_type > | os_traits |
typedef os_traits::thread_traits | thread_traits |
typedef os_traits::lock_traits | lock_traits |
typedef os_traits::exception_type | exception_type |
Public Member Functions | |
~pool_thread () noexcept(false) FORCE_INLINE | |
const tstring __fastcall | to_string () const noexcept(false) override final |
Public Member Functions inherited from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type > | |
virtual void __fastcall | create_running () noexcept(false) FORCE_INLINE |
Start the underlying kernel thread. More... | |
const thread_traits::api_params_type &__fastcall | params () const noexcept(true) FORCE_INLINE |
const thread_traits::api_params_type::suspend_count __fastcall | suspend () noexcept(true) FORCE_INLINE |
const thread_base< generic_traits::MS_Win32, heavyweight_threading >::thread_traits::api_params_type::suspend_count __fastcall | suspend () noexcept(true) |
const thread_traits::api_params_type::suspend_count __fastcall | resume () noexcept(true) FORCE_INLINE |
const thread_traits::api_params_type::states __fastcall | state () const noexcept(true) FORCE_INLINE |
bool __fastcall | is_running () const noexcept(true) FORCE_INLINE |
thread_traits::api_params_type::priority_type __fastcall | kernel_priority () const noexcept(false) FORCE_INLINE |
void __fastcall | kernel_priority (const typename thread_traits::api_params_type::priority_type priority) noexcept(false) FORCE_INLINE |
thread_traits::api_params_type::processor_mask_type __fastcall | kernel_affinity () const noexcept(false) FORCE_INLINE |
void __fastcall | kernel_affinity (const typename thread_traits::api_params_type::processor_mask_type &mask) noexcept(false) FORCE_INLINE |
Static Public Attributes | |
static constexpr generic_traits::api_type | api_type =OST::thread_traits::api_params_type::api_type |
Static Public Attributes inherited from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type > | |
static constexpr ppd::generic_traits::memory_access_modes | memory_access_mode |
Protected Member Functions | |
__stdcall | pool_thread (exit_requested_type &exit_r, const typename os_traits::thread_traits::api_params_type::suspend_period_ms exit_wait_p=50) noexcept(false) FORCE_INLINE |
Protected Member Functions inherited from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type > | |
__stdcall | thread_base (const typename thread_traits::api_params_type::suspend_period_ms exit_wait_p) noexcept(false) FORCE_INLINE |
Create the wrapper object. Note that the underlying kernel thread will not have been started. More... | |
__stdcall | thread_base (const thread_base &tb) noexcept(true) FORCE_INLINE |
virtual __stdcall | ~thread_base () noexcept(false) FORCE_INLINE |
Thread base dtor. More... | |
void __fastcall | wait_thread_exit () noexcept(false) FORCE_INLINE |
virtual thread_traits::api_params_type::states __fastcall | process () noexcept(false)=0 |
This is the main "work" function. Implement it to do some work in the thread. More... | |
Protected Attributes | |
exit_requested_type & | exit_requested_ |
This event is used by the pool to request that all thread members of the pool should exit. More... | |
Protected Attributes inherited from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type > | |
os_traits::thread_exception | exception_thrown_in_thread |
This is to allow exceptions thrown in the contained thread to be (hopefully) propagated back to another thread on which that exception can be caught & handled. More... | |
lock_traits::critical_section_type | thread_params_lock |
thread_traits::api_params_type | thread_params |
Additional Inherited Members | |
Public Attributes inherited from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type > | |
const thread_traits::api_params_type::suspend_period_ms | exit_wait_period |
This class of threads is used within the various thread_pool classes.
Implementation details:
Definition at line 104 of file pool_thread.hpp.
using jmmcg::ppd::pool::private_::pool_thread< OST, ExitReq >::base_t = ppd::private_::thread_base<OST::thread_traits::api_params_type::api_type, typename OST::thread_traits::model_type> |
Definition at line 123 of file pool_thread.hpp.
using jmmcg::ppd::pool::private_::pool_thread< OST, ExitReq >::exit_requested_type = ExitReq |
The exit event type.
Definition at line 126 of file pool_thread.hpp.
using jmmcg::ppd::pool::private_::pool_thread< OST, ExitReq >::model_type = typename OST::thread_traits::model_type |
Definition at line 125 of file pool_thread.hpp.
using jmmcg::ppd::pool::private_::pool_thread< OST, ExitReq >::os_traits = OST |
Definition at line 124 of file pool_thread.hpp.
|
inlinenoexcept |
Definition at line 130 of file pool_thread.hpp.
|
inlineexplicitprotectednoexcept |
Definition at line 143 of file pool_thread.hpp.
|
inlinefinaloverridevirtualnoexcept |
Reimplemented from jmmcg::ppd::private_::thread_base< OST::thread_traits::api_params_type::api_type, OST::thread_traits::model_type >.
Definition at line 132 of file pool_thread.hpp.
|
staticconstexpr |
Definition at line 128 of file pool_thread.hpp.
|
protected |
This event is used by the pool to request that all thread members of the pool should exit.
Definition at line 141 of file pool_thread.hpp.