libjmmcg
build_2783
A C++ library containing an eclectic mix of useful, advanced components.
|
The wrapper for the input work that the user wishes to have mutated. More...
#include <thread_work_closure.hpp>
Public Types | |
typedef closure_base< CFG > | base_t |
typedef base_t::cfg_type | cfg_type |
typedef base_t::cfg_details_type | cfg_details_type |
typedef Res | result_type |
The result-type of the mutation, to assist in making the derived types look like a std::unary_function. More... | |
typedef InpWk | argument_type |
The argument-type of the mutation, to assist in making the derived types look like a std::unary_function. More... | |
Public Types inherited from jmmcg::ppd::private_::closure::closure_base< CFG > | |
typedef CFG | cfg_type |
typedef cfg_type::template add_cfg_details< closure_base > | cfg_details_type |
Public Member Functions | |
__stdcall | closure_static (argument_type &&i, typename cfg_details_type::params const &p) noexcept(false) FORCE_INLINE |
__stdcall | ~closure_static () noexcept(true) FORCE_INLINE |
bool __fastcall | operator== (const closure_static &) const noexcept(true) FORCE_INLINE |
bool __fastcall | operator< (const closure_static &) const noexcept(true) FORCE_INLINE |
const argument_type &__fastcall | input () const noexcept(true) FORCE_INLINE |
argument_type &__fastcall | input () noexcept(true) FORCE_INLINE |
void __fastcall | process () FORCE_INLINE |
Process the wrapped work. More... | |
const result_type &__fastcall | get_results () const noexcept(false) FORCE_INLINE |
Return a reference to the wrapped work. More... | |
result_type &__fastcall | get_results () noexcept(false) FORCE_INLINE |
Return a reference to the wrapped work. More... | |
Public Member Functions inherited from jmmcg::ppd::private_::closure::closure_base< CFG > | |
constexpr int | response_time () const noexcept(true) FORCE_INLINE |
This function could be overridden in the user's work class to provide an indication of the time it would take to process the transferred closure_base-derived closure. This would only make sense if the pool_aspect was instantiated with a trait of pool_traits::prioritised_queue, and the closure_base-derived closure has the correct operator<() declared for it. More... | |
void | update_edge (typename cfg_type::node_property_t::value_type const e_details) noexcept(false) FORCE_INLINE |
void | delete_edge () noexcept(false) FORCE_INLINE |
void | checkpoint_cfg () noexcept(false) FORCE_INLINE |
const cfg_type::vertex_t | vertex () const noexcept(true) FORCE_INLINE |
Friends | |
tostream &__fastcall | operator<< (tostream &os, closure_static const &w) noexcept(false) |
Additional Inherited Members | |
Protected Member Functions inherited from jmmcg::ppd::private_::closure::closure_base< CFG > | |
closure_base (typename cfg_details_type::params const &p) noexcept(noexcept(cfg_details_type(std::declval< typename cfg_details_type::params >()))) FORCE_INLINE | |
virtual | ~closure_base () noexcept(true) FORCE_INLINE |
The wrapper for the input work that the user wishes to have mutated.
The input work to be transferred must be:
Definition at line 281 of file thread_work_closure.hpp.
typedef InpWk jmmcg::ppd::private_::closure::closure_static< InpWk, Res, NoExcept,, CFG >::argument_type |
The argument-type of the mutation, to assist in making the derived types look like a std::unary_function.
Definition at line 287 of file thread_work_closure.hpp.
typedef closure_base<CFG> jmmcg::ppd::private_::closure::closure_static< InpWk, Res, NoExcept,, CFG >::base_t |
Definition at line 283 of file thread_work_closure.hpp.
typedef base_t::cfg_details_type jmmcg::ppd::private_::closure::closure_static< InpWk, Res, NoExcept,, CFG >::cfg_details_type |
Definition at line 285 of file thread_work_closure.hpp.
typedef base_t::cfg_type jmmcg::ppd::private_::closure::closure_static< InpWk, Res, NoExcept,, CFG >::cfg_type |
Definition at line 284 of file thread_work_closure.hpp.
typedef Res jmmcg::ppd::private_::closure::closure_static< InpWk, Res, NoExcept,, CFG >::result_type |
The result-type of the mutation, to assist in making the derived types look like a std::unary_function.
Definition at line 286 of file thread_work_closure.hpp.
|
inlineexplicitnoexcept |
Definition at line 178 of file thread_work_closure_impl.hpp.
|
inlinenoexcept |
Definition at line 290 of file thread_work_closure.hpp.
|
inlinenoexcept |
Return a reference to the wrapped work.
Definition at line 220 of file thread_work_closure_impl.hpp.
|
inlinenoexcept |
Return a reference to the wrapped work.
Definition at line 226 of file thread_work_closure_impl.hpp.
|
inlinenoexcept |
Definition at line 197 of file thread_work_closure_impl.hpp.
|
inlinenoexcept |
Definition at line 203 of file thread_work_closure_impl.hpp.
|
inlinenoexcept |
Definition at line 185 of file thread_work_closure_impl.hpp.
|
inlinenoexcept |
Definition at line 191 of file thread_work_closure_impl.hpp.
|
inline |
Process the wrapped work.
By default, all exceptions derived from std::exception are caught and wrapped, to be potentially transferred to the client. Also a "catch-all" block traps any other unknown exceptions, that are also potentially transferred. It is a grave programmatic error to allow a thread_pool with un-emitted exceptions to execute it's destructor. To avoid this potential for undefined behaviour, if process()ing the closure_static is likely to result in an exception being thrown, the user should capture the result of the transfer in an execution_context and dereference it, when the exception will be safely re-thrown, and the user will have an opportunity to correctly catch it and deal with it.
Definition at line 212 of file thread_work_closure_impl.hpp.
|
friend |
Definition at line 314 of file thread_work_closure.hpp.