X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fthread_pool_observer.cpp;h=f400ba5b079d7d4aa2679f6c750116fc886774cd;hb=f82b19f2b93707657fee804bd1242f2548d51ada;hp=b66be7e912105c2bd66eb557c80d7d2314211414;hpb=9c480b66660e691cd0dc5ed869c1d902250dd674;p=metaproxy-moved-to-github.git diff --git a/src/thread_pool_observer.cpp b/src/thread_pool_observer.cpp index b66be7e..f400ba5 100644 --- a/src/thread_pool_observer.cpp +++ b/src/thread_pool_observer.cpp @@ -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 #include @@ -26,24 +11,16 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #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