-/* $Id: thread_pool_observer.cpp,v 1.4 2005-10-13 20:06:45 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>
#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)
{
int i;
for (i = 0; i<no_threads; i++)
{
- worker w(this);
+ Worker w(this);
m_thrds.add_thread(new boost::thread(w));
}
}
* Local variables:
* c-basic-offset: 4
* indent-tabs-mode: nil
+ * c-file-style: "stroustrup"
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/