Geant4 11.3.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 | |
using | promise_type = std::promise<RetT> |
using | future_type = std::future<RetT> |
using | result_type = RetT |
![]() | |
using | tid_type = std::thread::id |
using | size_type = size_t |
using | void_func_t = std::function<void()> |
Public Member Functions | |
template<typename... Args> | |
TaskFuture (Args &&... args) | |
~TaskFuture () override=default | |
TaskFuture (const TaskFuture &)=delete | |
TaskFuture & | operator= (const TaskFuture &)=delete |
TaskFuture (TaskFuture &&) noexcept=default | |
TaskFuture & | operator= (TaskFuture &&) noexcept=default |
virtual future_type | get_future ()=0 |
virtual void | wait ()=0 |
virtual RetT | get ()=0 |
![]() | |
VTask (bool _is_native, intmax_t _depth) | |
VTask ()=default | |
virtual | ~VTask ()=default |
VTask (const VTask &)=delete | |
VTask & | operator= (const VTask &)=delete |
VTask (VTask &&)=default | |
VTask & | operator= (VTask &&)=default |
virtual void | operator() ()=0 |
bool | is_native_task () const |
intmax_t | depth () const |
Additional Inherited Members | |
![]() | |
bool | m_is_native = false |
intmax_t | m_depth = 0 |
void_func_t | m_func = []() {} |
The task class is supplied to thread_pool.
using PTL::TaskFuture< RetT >::future_type = std::future<RetT> |
using PTL::TaskFuture< RetT >::promise_type = std::promise<RetT> |
using PTL::TaskFuture< RetT >::result_type = RetT |
|
inline |
Definition at line 57 of file Task.hh.
Referenced by operator=(), operator=(), PTL::PackagedTask< RetT, Args... >::PackagedTask(), PTL::PackagedTask< RetT, Args... >::PackagedTask(), PTL::Task< RetT, Args... >::Task(), PTL::Task< RetT, Args... >::Task(), PTL::Task< RetT, void >::Task(), PTL::Task< RetT, void >::Task(), TaskFuture(), and TaskFuture().
|
overridedefault |
|
delete |
|
defaultnoexcept |
|
pure virtual |
Implemented in PTL::PackagedTask< RetT, Args >, PTL::PackagedTask< RetT, Args... >, PTL::PackagedTask< RetT, Args... >, PTL::Task< RetT, Args >, PTL::Task< _Ret, _Arg, _Args... >, PTL::Task< _Ret, _Arg, _Args... >, PTL::Task< ArgTp, decay_t< Args >... >, PTL::Task< ArgTp, decay_t< Args >... >, PTL::Task< RetT >, PTL::Task< RetT >, PTL::Task< RetT, Args... >, PTL::Task< RetT, Args... >, PTL::Task< RetT, void >, and PTL::Task< RetT, void >.
Referenced by get().
|
pure virtual |
Implemented in PTL::PackagedTask< RetT, Args >, PTL::PackagedTask< RetT, Args... >, PTL::PackagedTask< RetT, Args... >, PTL::Task< RetT, Args >, PTL::Task< _Ret, _Arg, _Args... >, PTL::Task< _Ret, _Arg, _Args... >, PTL::Task< ArgTp, decay_t< Args >... >, PTL::Task< ArgTp, decay_t< Args >... >, PTL::Task< RetT >, PTL::Task< RetT >, PTL::Task< RetT, Args... >, PTL::Task< RetT, Args... >, PTL::Task< RetT, void >, and PTL::Task< RetT, void >.
Referenced by get_future().
|
delete |
|
defaultnoexcept |
|
pure virtual |
Implemented in PTL::PackagedTask< RetT, Args >, PTL::PackagedTask< RetT, Args... >, PTL::PackagedTask< RetT, Args... >, PTL::Task< RetT, Args >, PTL::Task< _Ret, _Arg, _Args... >, PTL::Task< _Ret, _Arg, _Args... >, PTL::Task< ArgTp, decay_t< Args >... >, PTL::Task< ArgTp, decay_t< Args >... >, PTL::Task< RetT >, PTL::Task< RetT >, PTL::Task< RetT, Args... >, PTL::Task< RetT, Args... >, PTL::Task< RetT, void >, and PTL::Task< RetT, void >.
Referenced by wait().