On Monday 18 March 2013, Aymeric Augustin wrote:
> On 18 mars 2013, at 17:10, Shai Berger <s...@platonix.com> 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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to