[mod_python] Background threads in mod_python

Mike Looijmans nlv11281 at natlab.research.philips.com
Mon Jul 31 05:39:43 EDT 2006


A much safer option is to create a separate process for this kind of thing. Using the extremely 
simple XMLRPC package (built-in in Python) you can do calls into the "worker" process.

Apache will terminate your processes/threads at unexpected moments, since it expects all handlers to 
be stateless and only act in response to incoming requests. It may work on some configurations, but 
there's no guarantee that your application will behave the same on other systems.


Mike Looijmans
Philips Natlab / Topic Automation


Christian Gross wrote:
> Hi,
> 
> I have been using mod_python and am wondering about creating
> background threads. I can create the background thread, but if the
> thread requires a longer processing time than the request the
> background thread is exited.
> 
> Is it possible to create a background thread and have it execute
> without being killed?
> 
> Thanks
> 
> Christian Gross
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
> 



More information about the Mod_python mailing list