On Monday 18 March 2013, Aymeric Augustin wrote: > On 18 mars 2013, at 17:10, Shai Berger <[email protected]> wrote: > > If the persistent connections are thread-local, don't you want to close > > them anyway when the thread exits? > > Yes, do you know how this could be achieved? I haven't found how to hook > on thread termination. >
You can get a list of the "living" threads from threading.enumerate(), so it is possible to find out that a thread has already ended. This probably quite inefficient, but may be good enough for runserver. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
