4 #ifndef _iqxmlrpc_executor_h_
5 #define _iqxmlrpc_executor_h_
12 #pragma warning(disable: 4275)
15 #include <boost/thread/thread.hpp>
16 #include <boost/thread/mutex.hpp>
17 #include <boost/thread/condition.hpp>
34 class Server_connection;
37 class Serial_executor_factory;
38 class Pool_executor_factory;
49 typedef boost::mutex Lock;
66 void set_interceptors(
Interceptor* ic) { interceptors = ic; }
69 virtual void execute(
const Param_list& params ) = 0;
72 void schedule_response(
const Response& );
73 void interrupt_server();
110 #pragma warning(push)
111 #pragma warning(disable: 4251)
124 void process_actual_execution();
130 friend class Pool_thread;
132 boost::thread_group threads;
133 std::vector<Pool_thread*> pool;
136 std::deque<Pool_executor*> req_queue;
137 boost::mutex req_queue_lock;
138 boost::condition req_queue_cond;
141 boost::mutex destructor_lock;
151 void add_threads(
unsigned num);
157 bool is_being_destructed();
160 void destruction_started();