X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fthread_pool_observer.hpp;h=630b39b3d865ce86c26632927dbb4861f7a338c3;hb=586d78659d671683f33ec55f4a7d32b28e345ccd;hp=1adeb19615d6a529cf527a28225624e316922bc0;hpb=c1d953eee6c00432493bc364da6284704ccd9cc2;p=metaproxy-moved-to-github.git diff --git a/src/thread_pool_observer.hpp b/src/thread_pool_observer.hpp index 1adeb19..630b39b 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-2011 Index Data + Copyright (C) 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 @@ -28,8 +28,9 @@ namespace metaproxy_1 { class IThreadPoolMsg { public: virtual IThreadPoolMsg *handle() = 0; - virtual void result() = 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;