SimpleRunningTask< Functor > Class Template Reference

Usage: More...

#include <ArmarXCore/core/services/tasks/TaskUtil.h>

+ Inheritance diagram for SimpleRunningTask< Functor >:

Public Member Functions

void runningFn ()
 
 SimpleRunningTask (Functor f, std::string name="")
 
- Public Member Functions inherited from RunningTask< SimpleRunningTask< std::function< void(void)> > >
 RunningTask (T *parent, method_type runningFn, const std::string &name="")
 Constructs a running task within the class parent which calls the runningFn in a new thread. More...
 

Public Attributes

Functor f
 

Additional Inherited Members

- Public Types inherited from RunningTask< SimpleRunningTask< std::function< void(void)> > >
typedef void(T::* method_type) (void)
 Typedef for the thread method. More...
 
using pointer_type = IceUtil::Handle< RunningTask< T > >
 Shared pointer type for convenience. More...
 

Detailed Description

template<class Functor = std::function<void(void)>>
class armarx::SimpleRunningTask< Functor >

Usage:

   SimpleRunningTask<>::pointer_type task = new SimpleRunningTask<>([&]
   {
      ARMARX_INFO << "Hello world from another thread";
   });
   task->start();

Definition at line 70 of file TaskUtil.h.

Constructor & Destructor Documentation

◆ SimpleRunningTask()

SimpleRunningTask ( Functor  f,
std::string  name = "" 
)
inline

Definition at line 73 of file TaskUtil.h.

Member Function Documentation

◆ runningFn()

void runningFn ( )
inline

Definition at line 77 of file TaskUtil.h.

Member Data Documentation

◆ f

Functor f

Definition at line 81 of file TaskUtil.h.


The documentation for this class was generated from the following file: