Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
986 B

  1. /************************************************************************************************
  2. Copyright (c) 2001 Microsoft Corporation
  3. File Name: ThdPool.hxx
  4. Abstract: Defines the CThreadPool, IO Completion Port based thread pool object
  5. Notes:
  6. History: 08/01/2001 Created by Hao Yu (haoyu)
  7. ************************************************************************************************/
  8. #ifndef __POP3_THREAD_POOL_HXX__
  9. #define __POP3_THREAD_POOL_HXX__
  10. #include "IOContext.h"
  11. class CThreadPool
  12. {
  13. public:
  14. CThreadPool();
  15. ~CThreadPool();
  16. BOOL Initialize(DWORD dwThreadPerProcessor);
  17. void Uninitialize();
  18. BOOL AssociateContext(PIO_CONTEXT pIoContext);
  19. private:
  20. CRITICAL_SECTION m_csInitGuard;
  21. HANDLE m_hIOCompPort;
  22. HANDLE * m_phTdArray;
  23. DWORD m_dwTdCount;
  24. BOOL m_bInit;
  25. };
  26. #endif //__POP3_THREAD_POOL_HXX__