25 Nov 14:39
ThreadManager and subscribing
From: dundeemt <dundeemt@...>
Subject: ThreadManager and subscribing
Newsgroups: gmane.comp.python.cherrypy
Date: 2008-11-25 13:41:03 GMT
Subject: ThreadManager and subscribing
Newsgroups: gmane.comp.python.cherrypy
Date: 2008-11-25 13:41:03 GMT
I am confused as to the proper way to handle subscribing to threads in
embedded mode.
If running standalone CP, then you should subscribe to start_thread/
stop_thread, correct?
But if you are running under Apache you should subscribe to
acquire_thread and ?stop_thread?
from the ThreadManager docstring:
If threads are created and destroyed by code you do not control
(e.g., Apache), then, at the beginning of every HTTP request,
publish to 'acquire_thread' only. You should not publish to
'release_thread' in this case, since you do not know whether
the thread will be re-used or not. The bus will call
'stop_thread' listeners for you when it stops.
-Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
(Continue reading)
RSS Feed