OverSim
XmlRpcThreadedServer.cc
Go to the documentation of this file.
1 
7 #if defined(XMLRPC_THREADS)
8 
9 #include "XmlRpcThreadedServer.h"
10 //#include "XmlRpcServerConnection.h"
11 
12 
13 using namespace XmlRpc;
14 
15 // executeRequestThreaded:
16 // remove the serverConnection from the dispatcher (but don't close the socket)
17 // push the request onto the request queue
18 // (acquire the mutex, push_back request, release mutex, incr semaphore)
19 //
20 
21 // worker::run
22 // while ! stopped
23 // pop a request off the request queue (block on semaphore/decr, acquire mutex, get request, rel)
24 // executeRequest (parse, run, generate response)
25 // notify the serverConnection that the response is available
26 // (the serverConnection needs to add itself back to the dispatcher safely - mutex)
27 
28 // How do I interrupt the dispatcher if it is waiting in a select call?
29 // i) Replace select with WaitForMultipleObjects, using WSAEventSelect to associate
30 // each socket with an event object, and adding an additional "signal" event.
31 //
32 
33 #endif // XMLRPC_THREADS