This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients kristjan.jonsson, sbt
Date 2013-05-13.14:41:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368456071.6.0.815109099247.issue17969@psf.upfronthosting.co.za>
In-reply-to
Content
> In general, deallocators should have no side effects, I think.  
> Releaseing the GIL is certainly a side effect.

Notice that socket and file objects also release the GIL when being deallocated.  At least for sockets close() can block (e.g. if you you use the SO_LINGER option).

I am not sure whether we can ignore the possibility for connection objects.

> I realize that process shutdown is a delicate matter.  One delicate 
> thing is that we cannot allow worker threads to run anymore.  I see no 
> general mechanism for ensuring this, but surely at least not releasing 
> the GIL for deallocators is a first step?

I agree that shutdown matters are delicate, particularly when daemon threads are involved.  In fact I'm starting to agree with Antoine that daemon threads are evil and should be avoided wherever possible.

P.S. I think in Python 3.x this thread switching is stopped (by setting _Py_Finalizing to something non-NULL) before PyInterpreterState_Clear() is run.
History
Date User Action Args
2013-05-13 14:41:11sbtsetrecipients: + sbt, kristjan.jonsson
2013-05-13 14:41:11sbtsetmessageid: <1368456071.6.0.815109099247.issue17969@psf.upfronthosting.co.za>
2013-05-13 14:41:11sbtlinkissue17969 messages
2013-05-13 14:41:11sbtcreate