libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType > Struct Template Reference

Used by the library to implicitly generate a closure from the InpWk type. More...

#include <thread_pool.hpp>

Inheritance diagram for jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >:
[legend]
Collaboration diagram for jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >:
[legend]

Public Types

typedef private_::create_direct< pool_traits_type, InpWk, FnType, &std::remove_reference< InpWk >::type::process > base_t
 
typedef base_t::process_fn_traits process_fn_traits
 
using closure_t = typename base_t::closure_t
 
typedef process_fn_traits::result_type result_type
 
typedef private_::execution_context_stack_type< pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits_type::result_traits_, sequential_pool, InpWk > execution_context_stack
 This is a useful typedef to get at the execution_context. More...
 
- Public Types inherited from jmmcg::ppd::private_::create_direct< pool_traits_type, InpWk, FnType, &std::remove_reference< InpWk >::type::process >
typedef pool_traits_type pool_traits_type
 
typedef pool_traits_type::os_traits os_traits
 
typedef pool_traits_type::cfg_type cfg_type
 
typedef get_process_fn_traits< InpWk, FnType, cfg_type >::type process_fn_traits
 
typedef process_fn_traits::result_type result_type
 
typedef process_fn_traits::process_fn_ptr process_fn_ptr
 
typedef process_fn_traits::type::template queue_item< FnPtr >::result closure_t
 

Detailed Description

template<class DM, pool_traits::size_mode_t Ps, typename P>
template<typename InpWk, class FnType = decltype(&std::remove_reference<InpWk>::type::process)>
struct jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >

Used by the library to implicitly generate a closure from the InpWk type.

Definition at line 186 of file thread_pool.hpp.

Member Typedef Documentation

◆ base_t

template<class DM, pool_traits::size_mode_t Ps, typename P>
template<typename InpWk, class FnType = decltype(&std::remove_reference<InpWk>::type::process)>
typedef private_::create_direct<pool_traits_type, InpWk, FnType, &std::remove_reference<InpWk>::type::process> jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >::base_t

Definition at line 187 of file thread_pool.hpp.

◆ closure_t

template<class DM, pool_traits::size_mode_t Ps, typename P>
template<typename InpWk, class FnType = decltype(&std::remove_reference<InpWk>::type::process)>
using jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >::closure_t = typename base_t::closure_t

Definition at line 189 of file thread_pool.hpp.

◆ execution_context_stack

template<class DM, pool_traits::size_mode_t Ps, typename P>
template<typename InpWk, class FnType = decltype(&std::remove_reference<InpWk>::type::process)>
typedef private_::execution_context_stack_type<pool_traits::work_distribution_mode_t::one_thread_distributes<>, pool_traits_type::result_traits_, sequential_pool, InpWk> jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >::execution_context_stack

This is a useful typedef to get at the execution_context.

The execution_context is created by joinably transferring work into the pool. It has various uses, but is primarily used to atomically and synchronously wait on the results of the work on the closure_base-derived closure-derived object, as specified by the thread_wk_t object transferred into the pool. But it can also pass back specified exceptions that may be thrown by the work. It can also be used to asynchronously test if the work has been completed, and delete the work from the pool, if it has not been started.

See also
execution_context_type_stack
joinable
closure_base

Definition at line 199 of file thread_pool.hpp.

◆ process_fn_traits

template<class DM, pool_traits::size_mode_t Ps, typename P>
template<typename InpWk, class FnType = decltype(&std::remove_reference<InpWk>::type::process)>
typedef base_t::process_fn_traits jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >::process_fn_traits

Definition at line 188 of file thread_pool.hpp.

◆ result_type

template<class DM, pool_traits::size_mode_t Ps, typename P>
template<typename InpWk, class FnType = decltype(&std::remove_reference<InpWk>::type::process)>
typedef process_fn_traits::result_type jmmcg::ppd::private_::sequential_pool< DM, Ps, P >::create_direct< InpWk, FnType >::result_type

Definition at line 190 of file thread_pool.hpp.


The documentation for this struct was generated from the following file: