[CherryPy] #1084: http.ThreadPool not overridable

4 views
Skip to first unread message

CherryPy

unread,
Aug 29, 2011, 1:12:19 PM8/29/11
to cherrypy...@googlegroups.com
#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

CherryPy

unread,
Aug 29, 2011, 1:12:57 PM8/29/11
to cherrypy...@googlegroups.com
#1084: http.ThreadPool not overridable
-------------------------+--------------------------------------------------
Reporter: guest | Owner: fumanchu
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Resolution:
Keywords: |
-------------------------+--------------------------------------------------

CherryPy

unread,
Aug 29, 2011, 1:14:45 PM8/29/11
to cherrypy...@googlegroups.com
#1084: http.ThreadPool not overridable
-------------------------+--------------------------------------------------
Reporter: guest | Owner: fumanchu
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by kris...@ccpgames.com):

reported by kris...@ccpgames.com

CherryPy

unread,
Aug 30, 2011, 8:30:21 AM8/30/11
to cherrypy...@googlegroups.com
#1084: http.ThreadPool not overridable
-------------------------+--------------------------------------------------
Reporter: guest | Owner: fumanchu
Type: enhancement | Status: new
Priority: normal | Milestone: 3.2
Component: wsgiserver | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by kris...@ccpgames.com):

* milestone: => 3.2
Reply all
Reply to author
Forward
0 new messages