On Thursday, June 2, 2016 at 5:15:55 PM UTC+2, Aymeric Augustin wrote: > > > On 02 Jun 2016, at 13:39, Cristiano Coelho <[email protected] > <javascript:>> wrote: > > > > it would be great for them to be automatically closed/disposed for you > on thread's death, which right now seems to happen some times, and some > times not, leaking connections (something I'm trying to figure out what's > going on). > > In the scenario you’re discussing here, connections are closed when Python > garbage collects them, which can cause seemingly random behavior. >
Assuming a new enough python (2.7.1 iirc), that should reliably happen once a thread is destroyed -- earlier versions would keep the connection till the actual thread local went out of scope. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4ae7f872-46da-4999-be0d-ce688b01b170%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
