CAPD::DynSys Library  6.0.0
capd::threading::LambdaTask< F > Struct Template Reference

#include <capd/threading/ThreadPool.h>

Public Types

typedef std::unique_lock< std::mutex > Lock
 

Public Member Functions

 LambdaTask (F &_f)
 
void run (unsigned threadId)
 
void join ()
 wait for task completion More...
 
void execute (unsigned threadId)
 This method can be invoked by the user but it is recomended to run tasks through a ThreadPool instance. More...
 

Static Public Member Functions

template<class F >
static LambdaTask< F > * createFromLambda (F &f)
 

Public Attributes

F & f
 

Member Typedef Documentation

◆ Lock

typedef std::unique_lock<std::mutex> capd::threading::Task::Lock
inherited

Constructor & Destructor Documentation

◆ LambdaTask()

template<class F >
capd::threading::LambdaTask< F >::LambdaTask ( F &  _f)
inline

Member Function Documentation

◆ execute()

void capd::threading::Task::execute ( unsigned  threadId)
inlineinherited

This method can be invoked by the user but it is recomended to run tasks through a ThreadPool instance.

◆ join()

void capd::threading::Task::join ( )
inlineinherited

wait for task completion

◆ run()

template<class F >
void capd::threading::LambdaTask< F >::run ( unsigned  threadId)
inlinevirtual

Implements capd::threading::Task.

Member Data Documentation

◆ f

template<class F >
F& capd::threading::LambdaTask< F >::f

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