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 neologix
Recipients kristjan.jonsson, neologix, pitrou, sbt
Date 2013-05-13.15:36:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368459414.77.0.378502041293.issue17969@psf.upfronthosting.co.za>
In-reply-to
Content
> Also, even though an IO call _can_ block, that doesn't mean that
> we _must_ release the gil for the duration.

Yes, otherwise some people will complain when the whole interpreter is stuck while a socket/NFS file handle/whatever is shutdown.

This problem isn't specific to multiprocessing: for example, if a daemon thread's thread state is cleared as part of the shutdown procedure, and one of the TLS object releases the GIL (e.g. a database connection), you'll have the same kind of problem.

AFAICT, it's "solved" in Python 3 because, as Richard said, you can't acquire the GIL once the interpreter is shutting down.
Daemon threads are *really* tricky, since they can wake-up while the interpreter is shutting down.
So they should be avoided as much as possible.
We can also try to think some more about a way to avoid/limit this type of issue, but it's not trivial...
History
Date User Action Args
2013-05-13 15:36:54neologixsetrecipients: + neologix, pitrou, kristjan.jonsson, sbt
2013-05-13 15:36:54neologixsetmessageid: <1368459414.77.0.378502041293.issue17969@psf.upfronthosting.co.za>
2013-05-13 15:36:54neologixlinkissue17969 messages
2013-05-13 15:36:54neologixcreate