49template <
typename RetT,
typename... Args>
62 template <
typename FuncT>
65 , m_ptask(std::forward<FuncT>(func))
69 template <
typename FuncT>
72 , m_ptask(std::forward<FuncT>(func))
76 template <
typename FuncT>
79 , m_ptask(std::forward<FuncT>(func))
89 mpl::apply(std::move(m_ptask), std::move(m_args));
102template <
typename RetT,
typename... Args>
114 template <
typename FuncT>
115 Task(FuncT&& func, Args... args)
117 , m_ptask(std::forward<FuncT>(func))
121 template <
typename FuncT>
124 , m_ptask(std::forward<FuncT>(func))
128 template <
typename FuncT>
131 , m_ptask(std::forward<FuncT>(func))
141 mpl::apply(std::move(m_ptask), std::move(m_args));
161template <
typename RetT>
172 template <
typename FuncT>
175 , m_ptask(std::forward<FuncT>(func))
178 template <
typename FuncT>
181 , m_ptask(std::forward<FuncT>(func))
184 template <
typename FuncT>
187 , m_ptask(std::forward<FuncT>(func))
227 template <
typename FuncT>
230 , m_ptask(std::forward<FuncT>(func))
233 template <
typename FuncT>
236 , m_ptask(std::forward<FuncT>(func))
239 template <
typename FuncT>
242 , m_ptask(std::forward<FuncT>(func))
The task class is supplied to thread_pool.
std::packaged_task< RetT(Args...)> packaged_task_type
std::tuple< Args... > tuple_type
std::promise< RetT > promise_type
PackagedTask(FuncT &&func, Args... args)
PackagedTask(VTaskGroup *tg, FuncT &&func, Args... args)
virtual void operator()() override
virtual bool is_native_task() const override
std::future< RetT > future_type
PackagedTask(ThreadPool *_pool, FuncT &&func, Args... args)
PackagedTask< RetT, Args... > this_type
std::promise< RetT > promise_type
std::packaged_task< RetT()> packaged_task_type
virtual bool is_native_task() const override
std::future< RetT > future_type
Task(VTaskGroup *tg, FuncT &&func)
Task(ThreadPool *tp, FuncT &&func)
virtual void operator()() final
std::future< RetT > future_type
std::packaged_task< RetT()> packaged_task_type
virtual void operator()() final
Task< void, void > this_type
std::promise< RetT > promise_type
Task(VTaskGroup *tg, FuncT &&func)
virtual bool is_native_task() const override
Task(ThreadPool *tp, FuncT &&func)
The task class is supplied to thread_pool.
Task(FuncT &&func, Args... args)
Task(ThreadPool *tp, FuncT &&func, Args... args)
std::tuple< Args... > tuple_type
std::promise< RetT > promise_type
std::future< RetT > future_type
virtual void operator()() final
virtual bool is_native_task() const override
std::packaged_task< RetT(Args...)> packaged_task_type
Task(VTaskGroup *tg, FuncT &&func, Args... args)
Task< RetT, Args... > this_type
VTask is the abstract class stored in thread_pool.