|
|
@@ -6,10 +6,11 @@
|
|
|
#include <boost/function.hpp>
|
|
|
#include <boost/detail/atomic_count.hpp>
|
|
|
#include "Base/Base.h"
|
|
|
+#include "Thread/ThreadPoolIf.h"
|
|
|
|
|
|
namespace Hainan {
|
|
|
|
|
|
-class ThreadPool: private boost::noncopyable
|
|
|
+class ThreadPool: public ThreadPoolIf, private boost::noncopyable
|
|
|
{
|
|
|
private:
|
|
|
int thread_num_;
|
|
|
@@ -25,6 +26,7 @@ private:
|
|
|
public:
|
|
|
ThreadPool(int num = 0);
|
|
|
~ThreadPool();
|
|
|
+
|
|
|
void Start();
|
|
|
void Stop();
|
|
|
bool PushTask(boost::function<void (void)> task);
|