<br><br><div class="gmail_quote">On Tue, Feb 21, 2012 at 2:39 AM, Graham Dumpleton <span dir="ltr"><<a href="mailto:graham.dumpleton@gmail.com">graham.dumpleton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
...<br>
Overall the best chance of being able to do anything is relying on atexit.<br>
<br>
You are though at the mercy of the WSGI hosting mechanism shutting<br>
down the process and so the interpreter, in an orderly manner such<br>
that atexit callbacks get called.<br>
<br>
In Apache/mod_wsgi you get this guarantee, even in sub interpreters<br>
where atexit callbacks wouldn't normally be called when they are<br>
destroyed.<br>
<br>
For uWSGI, atexit callbacks will not be called at the moment, by<br>
Robert is making changes to it so you get a guarantee there as well.<br>
It is possible he is only doing this though for case where main<br>
interpreter is being used, as doing it for sub interpreters is a bit<br>
fiddly.<br>
<br></blockquote><div><br>But I don't think you can guarantee that everything is still up in memory by the time atexit gets called,<br>
so you can't really call cleanup code there.<br>
<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Any pure Python WSGI servers shouldn't have issues so long as they<br>
aren't force exiting the whole process and bypassing normal<br>
interpreter destruction.<br></blockquote><div><br>what do you mean by bypassing its destruction ?<br><br>Cheers<br>Tarek<br> </div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Graham<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Web-SIG mailing list<br>
<a href="mailto:Web-SIG@python.org">Web-SIG@python.org</a><br>
Web SIG: <a href="http://www.python.org/sigs/web-sig" target="_blank">http://www.python.org/sigs/web-sig</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/web-sig/ziade.tarek%40gmail.com" target="_blank">http://mail.python.org/mailman/options/web-sig/ziade.tarek%40gmail.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tarek Ziadé | <a href="http://ziade.org">http://ziade.org</a><br>