server_thread_pool.h

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 34 行

H
34
字号
// Server_Thread_Pool.h,v 1.5 2003/11/10 00:02:10 bala Exp

#include "ace/Task_T.h"
#include "ace/Service_Config.h"

#include "TestC.h"

class Thread_Pool : public ACE_Task<ACE_SYNCH>
{
  // = TITLE
  //   Defines a thread pool abstraction based on the <ACE_Task>.
public:
  Thread_Pool (ACE_Thread_Manager *thr_mgr,
               int n_threads);
  // Constructor activates <n_threads> in the thread pool.

  virtual ~Thread_Pool (void);
  // Destructor...
  int shutdown (void);

  virtual int svc (void);

  virtual int put (Test::Echo_ptr echoptr);

  virtual int put (ACE_Message_Block *mb,
                   ACE_Time_Value *tv = 0);
  // This allows the producer to pass messages to the <Thread_Pool>.

private:
  virtual int close (u_long);
  int nt_;                      // number of threads
  // Close hook.
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?