[HEADERS]
[reactos.git] / irc / ArchBlackmann / ThreadPool.h
1 // ThreadPool.h
2 // This file is (C) 2003-2004 Royce Mitchell III
3 // and released under the LGPL & BSD licenses
4
5 #ifndef THREADPOOL_H
6 #define THREADPOOL_H
7
8 #include "ReliMT.h"
9
10 typedef void THREADAPI ThreadPoolFunc ( void* );
11
12 class ThreadPoolImpl;
13
14 class ThreadPool : public Uncopyable
15 {
16 public:
17 static ThreadPool& Instance();
18 ~ThreadPool();
19
20 void Launch ( ThreadPoolFunc* pFun, void* pArg );
21 int IdleThreads();
22
23 private:
24 ThreadPool();
25 ThreadPoolImpl *_pimpl;
26 };
27
28 #endif// THREADPOOL_H