claraty::bg< result_type > Class Template Reference
#include <background_thread.h>
Inheritance diagram for claraty::bg< result_type >:


Public Member Functions | |
| template<class Op> | |
| bg (Op op, result_type &return_var, bool detach=false) | |
| virtual | ~bg () |
| virtual void | wait () |
Protected Attributes | |
| bool | detached |
Private Member Functions | |
| bg (const bg &rhs) | |
Private Attributes | |
| ACE_thread_t | thread_id |
| result_type & | return_value |
Detailed Description
template<class result_type>
class claraty::bg< result_type >
Definition at line 101 of file background_thread.h.
Constructor & Destructor Documentation
| claraty::bg< result_type >::bg | ( | const bg< result_type > & | rhs | ) | [explicit, private] |
| claraty::bg< result_type >::bg | ( | Op | op, | |
| result_type & | return_var, | |||
| bool | detach = false | |||
| ) | [inline] |
Definition at line 111 of file background_thread.h.
00112 : BG_Task(), 00113 // ACE_thread_t must be initialized to 0 for VxWorks 00114 // (undocumented in ACE) 00115 thread_id (0), 00116 return_value(return_var), detached(detach) 00117 { 00118 new bg_helper<Op, result_type>(op, return_var, thread_id, detach); 00119 }
| virtual claraty::bg< result_type >::~bg | ( | ) | [inline, virtual] |
Member Function Documentation
| virtual void claraty::bg< result_type >::wait | ( | ) | [inline, virtual] |
Reimplemented from claraty::BG_Task.
Reimplemented in claraty::auto_bg< ret_type >.
Definition at line 126 of file background_thread.h.
Referenced by claraty::bg< void >::~bg(), and claraty::bg< ret_type >::~bg().
00126 { 00127 assert(!detached); 00128 ACE_Thread_Manager *tm = ACE_Thread_Manager::instance(); 00129 tm->join(thread_id); 00130 detached = true; 00131 }
Member Data Documentation
ACE_thread_t claraty::bg< result_type >::thread_id [private] |
Definition at line 102 of file background_thread.h.
Referenced by claraty::bg< void >::bg(), claraty::bg< ret_type >::bg(), claraty::bg< void >::wait(), and claraty::bg< ret_type >::wait().
result_type& claraty::bg< result_type >::return_value [private] |
Definition at line 103 of file background_thread.h.
bool claraty::bg< result_type >::detached [protected] |
Definition at line 108 of file background_thread.h.
Referenced by claraty::bg< void >::wait(), claraty::bg< ret_type >::wait(), claraty::bg< void >::~bg(), and claraty::bg< ret_type >::~bg().
The documentation for this class was generated from the following file: