Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
|
The task class is supplied to thread_pool. More...
#include <Task.hh>
Public Types | |
typedef Task< RetT > | this_type |
typedef std::promise< RetT > | promise_type |
typedef std::future< RetT > | future_type |
typedef std::packaged_task< RetT()> | packaged_task_type |
typedef RetT | result_type |
Public Types inherited from PTL::VTask | |
typedef std::thread::id | tid_type |
typedef size_t | size_type |
typedef VTask | this_type |
typedef std::atomic_uintmax_t | count_t |
typedef VTask * | iterator |
typedef const VTask * | const_iterator |
typedef std::function< void()> | void_func_t |
Public Member Functions | |
template<typename FuncT > | |
Task (FuncT &&func) | |
template<typename FuncT > | |
Task (VTaskGroup *tg, FuncT &&func) | |
template<typename FuncT > | |
Task (ThreadPool *tp, FuncT &&func) | |
virtual | ~Task () |
virtual void | operator() () final |
virtual bool | is_native_task () const override |
future_type | get_future () |
Public Member Functions inherited from PTL::VTask | |
VTask () | |
VTask (VTaskGroup *task_group) | |
VTask (ThreadPool *pool) | |
virtual | ~VTask () |
virtual void | operator() ()=0 |
void | operator-- () |
virtual bool | is_native_task () const |
virtual ThreadPool * | pool () const |
VTaskGroup * | group () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
intmax_t & | depth () |
const intmax_t & | depth () const |
Additional Inherited Members | |
Static Protected Member Functions inherited from PTL::VTask | |
static tid_type | this_tid () |
Protected Attributes inherited from PTL::VTask | |
intmax_t | m_depth |
VTaskGroup * | m_group |
ThreadPool * | m_pool |
void_func_t | m_func = []() {} |
The task class is supplied to thread_pool.
typedef std::future<RetT> PTL::Task< RetT, void >::future_type |
typedef std::packaged_task<RetT()> PTL::Task< RetT, void >::packaged_task_type |
typedef std::promise<RetT> PTL::Task< RetT, void >::promise_type |
typedef RetT PTL::Task< RetT, void >::result_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
|
inlinefinalvirtual |
Implements PTL::VTask.
Definition at line 194 of file Task.hh.