1 #include "ace/Task_T.h"
2 #include "ace/Service_Config.h"
6 class Thread_Pool
: public ACE_Task
<ACE_SYNCH
>
9 // Defines a thread pool abstraction based on the <ACE_Task>.
11 Thread_Pool (CORBA::ORB_ptr orb
,
12 ACE_Thread_Manager
*thr_mgr
,
14 // Constructor activates <n_threads> in the thread pool.
16 virtual ~Thread_Pool ();
22 virtual int put (Test::Echo_ptr echoptr
);
24 virtual int put (ACE_Message_Block
*mb
,
25 ACE_Time_Value
*tv
= 0);
26 // This allows the producer to pass messages to the <Thread_Pool>.
29 virtual int close (u_long
);
32 ACE_Atomic_Op
<TAO_SYNCH_MUTEX
, int> nt_
; // number of threads