CUBRID Engine  latest
cubthread::callable_task< Context > Class Template Reference

#include <thread_task.hpp>

Inheritance diagram for cubthread::callable_task< Context >:
Inheritance graph
Collaboration diagram for cubthread::callable_task< Context >:
Collaboration graph

Public Types

using exec_func_type = std::function< void(Context &)>
 
- Public Types inherited from cubthread::task< Context >
using context_type = Context
 

Public Member Functions

 callable_task ()=delete
 
template<typename F >
 callable_task (const F &f, bool delete_on_retire=true)
 
template<typename F >
 callable_task (F &&f, bool delete_on_retire=true)
 
template<typename FuncExec , typename FuncRetire >
 callable_task (const FuncExec &fe, const FuncRetire &fr)
 
template<typename FuncExec , typename FuncRetire >
 callable_task (FuncExec &&fe, FuncRetire &&fr)
 
void execute (Context &ctx) final
 
void retire () final
 
- Public Member Functions inherited from cubthread::task< Context >
 task (void)=default
 
virtual ~task (void)=default
 

Private Attributes

std::function< void(Context &)> m_exec_f
 
std::function< void(void)> m_retire_f
 

Detailed Description

template<typename Context>
class cubthread::callable_task< Context >

Definition at line 83 of file thread_task.hpp.

Member Typedef Documentation

template<typename Context >
using cubthread::callable_task< Context >::exec_func_type = std::function<void (Context &)>

Definition at line 86 of file thread_task.hpp.

Constructor & Destructor Documentation

template<typename Context >
cubthread::callable_task< Context >::callable_task ( )
delete
template<typename Context >
template<typename F >
cubthread::callable_task< Context >::callable_task ( const F &  f,
bool  delete_on_retire = true 
)

Definition at line 233 of file thread_task.hpp.

References cubthread::callable_task< Context >::m_retire_f.

template<typename Context >
template<typename F >
cubthread::callable_task< Context >::callable_task ( F &&  f,
bool  delete_on_retire = true 
)

Definition at line 248 of file thread_task.hpp.

References cubthread::callable_task< Context >::m_retire_f.

template<typename Context >
template<typename FuncExec , typename FuncRetire >
cubthread::callable_task< Context >::callable_task ( const FuncExec &  fe,
const FuncRetire &  fr 
)

Definition at line 263 of file thread_task.hpp.

template<typename Context >
template<typename FuncExec , typename FuncRetire >
cubthread::callable_task< Context >::callable_task ( FuncExec &&  fe,
FuncRetire &&  fr 
)

Definition at line 271 of file thread_task.hpp.

Member Function Documentation

template<typename Context >
void cubthread::callable_task< Context >::execute ( Context &  ctx)
inlinefinalvirtual

Implements cubthread::task< Context >.

Definition at line 102 of file thread_task.hpp.

template<typename Context >
void cubthread::callable_task< Context >::retire ( void  )
inlinefinalvirtual

Reimplemented from cubthread::task< Context >.

Definition at line 107 of file thread_task.hpp.

Member Data Documentation

template<typename Context >
std::function<void (Context &)> cubthread::callable_task< Context >::m_exec_f
private

Definition at line 113 of file thread_task.hpp.

template<typename Context >
std::function<void (void)> cubthread::callable_task< Context >::m_retire_f
private

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