23 friend class cKernelThreadHelperRunnable;
25 typedef std::shared_ptr<ImplBase> shared_base_type;
30 shared_base_type pThisPtr;
31 inline virtual ~ImplBase() {}
32 virtual void Run() = 0;
35 template<
typename Callable>
36 struct Impl :
public ImplBase
40 Impl(Callable&& pFunc) : pFunc(std::forward<Callable>(pFunc))
50 template<
typename Callable>
51 std::shared_ptr<Impl<Callable>> MakeCallable(Callable&& pFunc)
53 return std::make_shared<Impl<Callable>>(std::forward<Callable>(pFunc));
56 shared_base_type m_pCallable;
75 template<
typename Callable,
typename ...Args>
79 m_pCallable = MakeCallable(std::bind(std::forward<Callable>(pFunc),
80 std::forward<Args>(args)...));
81 Create(strName, sScheduling);
87 template<
typename Callable,
typename ...Args>
90 std::forward<Callable>(pFunc),
91 std::forward<Args>(args)...)
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
kernel_thread(const adtf::services::IKernel::tSchedulingInfo &sScheduling, const char *strName, Callable &&pFunc, Args &&... args)
Definition kernel_thread.h:76