Gregory P. Smith added the comment:

agreed, during shutdown the other threads should be stopped.  anything
to do this complicates acquiring and releasing the GIL by adding another
check to see if we're shutting down.

brainstorm: I haven't looked at the existing BEGIN_ALLOW_THREADS and
END_ALLOW_THREADS implementations but would it be possible to modify
them on the fly from the thread doing the shutdown (main or not) while
it holds the GIL such that all future calls to BEGIN_ALLOW_THREADS do
not actually release the GIL and END_ALLOW_THREADS always blocks.  That
should bring other threads to a halt pretty quickly and prevent
destructors from releasing the GIL (file.close, etc).

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1856>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to