Same header and footer for all files. Header includes copyright +
[metaproxy-moved-to-github.git] / src / thread_pool_observer.cpp
index b66be7e..f400ba5 100644 (file)
@@ -1,22 +1,7 @@
-/* $Id: thread_pool_observer.cpp,v 1.3 2005-10-12 23:30:43 adam Exp $
-   Copyright (c) 1998-2005, Index Data.
+/* $Id: thread_pool_observer.cpp,v 1.7 2005-10-15 14:09:09 adam Exp $
+   Copyright (c) 2005, Index Data.
 
-This file is part of the yaz-proxy.
-
-YAZ proxy is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-YAZ proxy is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with YAZ proxy; see the file LICENSE.  If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+%LICENSE%
  */
 #include <unistd.h>
 #include <ctype.h>
@@ -26,24 +11,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 +33,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));
     }
 }
@@ -127,6 +104,7 @@ void ThreadPoolSocketObserver::put(IThreadPoolMsg *m)
  * Local variables:
  * c-basic-offset: 4
  * indent-tabs-mode: nil
+ * c-file-style: "stroustrup"
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab
  */