X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fthread_pool_observer.hpp;h=a13ccea85bdb20058157e6c78bc08232fda02658;hb=ad6db37aced496979244d4e58c479708f396bd84;hp=67aee0b215e79e14c2901d70a2884113edb8ae47;hpb=9633f388601013d6a4de9367a307dfe647dbbaa6;p=metaproxy-moved-to-github.git diff --git a/src/thread_pool_observer.hpp b/src/thread_pool_observer.hpp index 67aee0b..a13ccea 100644 --- a/src/thread_pool_observer.hpp +++ b/src/thread_pool_observer.hpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2012 Index Data + Copyright (C) 2005-2013 Index Data Metaproxy 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 @@ -30,6 +30,7 @@ namespace metaproxy_1 { virtual IThreadPoolMsg *handle() = 0; virtual void result(const char *info) = 0; virtual ~IThreadPoolMsg(); + virtual bool cleanup(void *info) = 0; }; class ThreadPoolSocketObserver : public yazpp_1::ISocketObserver { @@ -40,8 +41,10 @@ namespace metaproxy_1 { int no_threads); virtual ~ThreadPoolSocketObserver(); void put(IThreadPoolMsg *m); + void cleanup(IThreadPoolMsg *m, void *info); IThreadPoolMsg *get(); void run(void *p); + void get_thread_info(int &tbusy, int &total); private: void socketNotify(int event); boost::scoped_ptr m_p;