Fix Metaproxy stops logging after check config failed MP-590
[metaproxy-moved-to-github.git] / src / thread_pool_observer.hpp
index dd98312..630b39b 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2009 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<Rep> m_p;