#1084: http.ThreadPool not overridable
-------------------------+--------------------------------------------------
Reporter: guest | Owner: fumanchu
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Keywords:
-------------------------+--------------------------------------------------
It is not possible to change the ThreadPool used by the wsgiserver except
by monkeypatching the wsgiserver module.
Classes such as SocketServer commonly have a class attribute that
specifies which request class to instantiate, for example. This allows
subclasses to easily change those.
In my case, I need a different threadpool that works with tasklets,
instead of threads. In order to change it, I have to assign a different
class to wsgiserver.ThreadPool.
It would be preferable to be able to do something like:
class MyServer(cherrypy.wsgiserver.CherryPyWSGIServer):
threadpool = MyThreadPool
Similarly, to override the WorkerThread instances in the ThreadPool class,
and in general, when instantiating a framework class, that the user might
want to subclass.
--
Ticket URL: <
http://www.cherrypy.org/ticket/1084>
CherryPy <
http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework