SocketServer fail.
Technically, I should have known better. I thought I had a plan to solve the problem I described earlier.
My idea was towards the end of using python’s SocketServer to create a queue based control provider; i.e, people could connect to the server, and would enter a queue for getting 60 seconds of control over the missile launcher. My plan was to give hand the TCPSocketServer initializer a method that when called, would return a special request handler object that had been either put into a queue or given control; this request handler would then be controllable from the control object that stored it. That way, I would be able give the handler control of the missiles after going through the queue.
The fail came when I discovered that the constructor of a socket server request handler calls all of its processing functions inside itself: the job of running the request finishes when the initializer finishes.
I plan to change my subclassed request handler so that it does not do the job of running the request, instead, the control object will do that job, so that I can thread the handle calls. Oh well.
comments