On Tue, Feb 21, 2012 at 2:39 AM, Graham Dumpleton < graham.dumple...@gmail.com> wrote:
> ... > Overall the best chance of being able to do anything is relying on atexit. > > You are though at the mercy of the WSGI hosting mechanism shutting > down the process and so the interpreter, in an orderly manner such > that atexit callbacks get called. > > In Apache/mod_wsgi you get this guarantee, even in sub interpreters > where atexit callbacks wouldn't normally be called when they are > destroyed. > > For uWSGI, atexit callbacks will not be called at the moment, by > Robert is making changes to it so you get a guarantee there as well. > It is possible he is only doing this though for case where main > interpreter is being used, as doing it for sub interpreters is a bit > fiddly. > > But I don't think you can guarantee that everything is still up in memory by the time atexit gets called, so you can't really call cleanup code there. Any pure Python WSGI servers shouldn't have issues so long as they > aren't force exiting the whole process and bypassing normal > interpreter destruction. > what do you mean by bypassing its destruction ? Cheers Tarek > > Graham > _______________________________________________ > Web-SIG mailing list > Web-SIG@python.org > Web SIG: http://www.python.org/sigs/web-sig > Unsubscribe: > http://mail.python.org/mailman/options/web-sig/ziade.tarek%40gmail.com > -- Tarek Ziadé | http://ziade.org
_______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com