Remove p2 from cvsignore
[metaproxy-moved-to-github.git] / src / thread_pool_observer.cpp
index b66be7e..40323d9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: thread_pool_observer.cpp,v 1.3 2005-10-12 23:30:43 adam Exp $
+/* $Id: thread_pool_observer.cpp,v 1.6 2005-10-14 10:27:18 adam Exp $
    Copyright (c) 1998-2005, Index Data.
 
 This file is part of the yaz-proxy.
@@ -26,24 +26,16 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <yaz/log.h>
 
 #include "config.hpp"
-#include "thread_pool_observer.h"
+#include "thread_pool_observer.hpp"
 
 using namespace yazpp_1;
+using namespace yp2;
 
 IThreadPoolMsg::~IThreadPoolMsg()
 {
 
 }
 
-class worker {
-public:
-    worker(ThreadPoolSocketObserver *s) : m_s(s) {};
-    ThreadPoolSocketObserver *m_s;
-    void operator() (void) {
-        m_s->run(0);
-    }
-};
-
 ThreadPoolSocketObserver::ThreadPoolSocketObserver(ISocketObservable *obs, int no_threads)
     : m_SocketObservable(obs)
 {
@@ -56,7 +48,7 @@ ThreadPoolSocketObserver::ThreadPoolSocketObserver(ISocketObservable *obs, int n
     int i;
     for (i = 0; i<no_threads; i++)
     {
-        worker w(this);
+        Worker w(this);
         m_thrds.add_thread(new boost::thread(w));
     }
 }