claraty::bg_helper< Op, ret > Class Template Reference
#include <background_thread.h>
Collaboration diagram for claraty::bg_helper< Op, ret >:

Public Member Functions | |
| bg_helper (Op op, ret &return_var, ACE_thread_t &tid, bool detach=false) | |
| ~bg_helper () | |
Private Member Functions | |
| bg_helper (const bg_helper &rhs) | |
Static Private Member Functions | |
| static ACE_THR_FUNC_RETURN | dispatch (void *arg) |
Private Attributes | |
| Op | fn |
| ACE_thread_t & | thread_id |
| ret & | return_value |
Detailed Description
template<class Op, class ret>
class claraty::bg_helper< Op, ret >
Definition at line 43 of file background_thread.h.
Constructor & Destructor Documentation
| claraty::bg_helper< Op, ret >::bg_helper | ( | const bg_helper< Op, ret > & | rhs | ) | [explicit, private] |
| claraty::bg_helper< Op, ret >::bg_helper | ( | Op | op, | |
| ret & | return_var, | |||
| ACE_thread_t & | tid, | |||
| bool | detach = false | |||
| ) | [inline] |
Definition at line 58 of file background_thread.h.
References claraty::bg_helper< Op, ret >::dispatch(), and claraty::bg_helper< Op, ret >::thread_id.
00059 : fn(op), thread_id(tid), return_value(return_var) 00060 { 00061 ACE_Thread_Manager *tm = ACE_Thread_Manager::instance(); 00062 long flags = THR_NEW_LWP; 00063 if (!detach) 00064 flags |= THR_JOINABLE; 00065 tm->spawn(dispatch, this, flags, &thread_id); 00066 }
Here is the call graph for this function:

| claraty::bg_helper< Op, ret >::~bg_helper | ( | ) | [inline] |
Member Function Documentation
| static ACE_THR_FUNC_RETURN claraty::bg_helper< Op, ret >::dispatch | ( | void * | arg | ) | [inline, static, private] |
Definition at line 50 of file background_thread.h.
References claraty::bg_helper< Op, ret >::fn, and claraty::bg_helper< Op, ret >::return_value.
Referenced by claraty::bg_helper< Op, ret >::bg_helper().
00050 { 00051 bg_helper *mgr = static_cast<bg_helper*>(arg); 00052 mgr->return_value = mgr->fn(); 00053 delete mgr; 00054 return 0; 00055 }
Member Data Documentation
Op claraty::bg_helper< Op, ret >::fn [private] |
Definition at line 44 of file background_thread.h.
Referenced by claraty::bg_helper< Op, ret >::dispatch().
ACE_thread_t& claraty::bg_helper< Op, ret >::thread_id [private] |
Definition at line 45 of file background_thread.h.
Referenced by claraty::bg_helper< Op, ret >::bg_helper().
ret& claraty::bg_helper< Op, ret >::return_value [private] |
Definition at line 46 of file background_thread.h.
Referenced by claraty::bg_helper< Op, ret >::dispatch().
The documentation for this class was generated from the following file: