X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmsg-thread.h;h=8e8a5650f81eb736117110324198849440357987;hb=16fee003605b650c1a329694f060c27b5be5e95b;hp=9ef89f796db6e703fec4c69614e8662bff60766a;hpb=d7f41f16caf965adb1a5ffcdaa937787dfcc030a;p=yazproxy-moved-to-github.git diff --git a/src/msg-thread.h b/src/msg-thread.h index 9ef89f7..8e8a565 100644 --- a/src/msg-thread.h +++ b/src/msg-thread.h @@ -1,7 +1,7 @@ -/* $Id: msg-thread.h,v 1.4 2005-06-25 15:58:33 adam Exp $ - Copyright (c) 1998-2005, Index Data. +/* $Id: msg-thread.h,v 1.9 2006-03-30 10:31:25 adam Exp $ + Copyright (c) 1998-2006, Index Data. -This file is part of the yaz-proxy. +This file is part of the yazproxy. 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 @@ -27,13 +27,14 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #endif -#include +#include #include class IMsg_Thread { public: virtual IMsg_Thread *handle() = 0; virtual void result() = 0; + virtual ~IMsg_Thread(); }; class Msg_Thread_Queue_List { @@ -55,7 +56,7 @@ class Msg_Thread_Queue { class Msg_Thread : public yazpp_1::ISocketObserver { public: - Msg_Thread(yazpp_1::ISocketObservable *obs); + Msg_Thread(yazpp_1::ISocketObservable *obs, int no_threads); virtual ~Msg_Thread(); void socketNotify(int event); void put(IMsg_Thread *m); @@ -64,13 +65,13 @@ class Msg_Thread : public yazpp_1::ISocketObserver { int m_fd[2]; private: yazpp_1::ISocketObservable *m_SocketObservable; - pthread_t m_thread_id; + int m_no_threads; + pthread_t *m_thread_id; Msg_Thread_Queue m_input; Msg_Thread_Queue m_output; pthread_mutex_t m_mutex_input_data; pthread_cond_t m_cond_input_data; pthread_mutex_t m_mutex_output_data; - pthread_cond_t m_cond_output_data; bool m_stop_flag; };