Geant4-11
|
The task class is supplied to thread_pool. More...
#include <Task.hh>
Public Types | |
typedef std::future< RetT > | future_type |
typedef std::packaged_task< RetT(Args...)> | packaged_task_type |
typedef std::promise< RetT > | promise_type |
typedef RetT | result_type |
typedef size_t | size_type |
typedef PackagedTask< RetT, Args... > | this_type |
typedef std::thread::id | tid_type |
typedef std::tuple< Args... > | tuple_type |
typedef std::function< void()> | void_func_t |
Public Member Functions | |
intmax_t | depth () const |
virtual RetT | get () final |
virtual future_type | get_future () final |
bool | is_native_task () const |
virtual void | operator() () final |
PackagedTask & | operator= (const PackagedTask &)=delete |
PackagedTask & | operator= (PackagedTask &&)=default |
template<typename FuncT > | |
PackagedTask (bool _is_native, intmax_t _depth, FuncT func, Args... args) | |
PackagedTask (const PackagedTask &)=delete | |
template<typename FuncT > | |
PackagedTask (FuncT func, Args... args) | |
PackagedTask (PackagedTask &&)=default | |
virtual void | wait () final |
virtual | ~PackagedTask ()=default |
Protected Attributes | |
intmax_t | m_depth = 0 |
void_func_t | m_func = []() {} |
bool | m_is_native = false |
Private Attributes | |
tuple_type | m_args |
packaged_task_type | m_ptask |
The task class is supplied to thread_pool.
typedef std::future<RetT> PTL::PackagedTask< RetT, Args >::future_type |
typedef std::packaged_task<RetT(Args...)> PTL::PackagedTask< RetT, Args >::packaged_task_type |
typedef std::promise<RetT> PTL::PackagedTask< RetT, Args >::promise_type |
typedef RetT PTL::PackagedTask< RetT, Args >::result_type |
|
inherited |
typedef PackagedTask<RetT, Args...> PTL::PackagedTask< RetT, Args >::this_type |
|
inherited |
typedef std::tuple<Args...> PTL::PackagedTask< RetT, Args >::tuple_type |
|
inherited |
|
inline |
|
inline |
|
virtualdefault |
|
delete |
|
default |
|
inlineinherited |
|
inlinefinalvirtual |
Implements PTL::TaskFuture< RetT >.
Definition at line 120 of file Task.hh.
References PTL::PackagedTask< RetT, Args >::m_ptask.
|
inlinefinalvirtual |
Implements PTL::TaskFuture< RetT >.
Definition at line 118 of file Task.hh.
References PTL::PackagedTask< RetT, Args >::m_ptask.
|
inlineinherited |
|
inlinefinalvirtual |
Implements PTL::VTask.
Definition at line 117 of file Task.hh.
References PTL::mpl::apply(), PTL::PackagedTask< RetT, Args >::m_args, and PTL::PackagedTask< RetT, Args >::m_ptask.
|
delete |
|
default |
|
inlinefinalvirtual |
Implements PTL::TaskFuture< RetT >.
Definition at line 119 of file Task.hh.
References PTL::PackagedTask< RetT, Args >::m_ptask.
|
private |
Definition at line 124 of file Task.hh.
Referenced by PTL::PackagedTask< RetT, Args >::operator()().
|
protectedinherited |
Definition at line 82 of file VTask.hh.
Referenced by PTL::VTask::depth().
|
protectedinherited |
|
protectedinherited |
Definition at line 81 of file VTask.hh.
Referenced by PTL::VTask::is_native_task().
|
private |
Definition at line 123 of file Task.hh.
Referenced by PTL::PackagedTask< RetT, Args >::get(), PTL::PackagedTask< RetT, Args >::get_future(), PTL::PackagedTask< RetT, Args >::operator()(), and PTL::PackagedTask< RetT, Args >::wait().