Antoine Pitrou added the comment: Using any kind of potentially-blocking synchronization primitive from __del__ or weakref callback is indeed a bug waiting for happen. I agree non-trivial cases can be hard to debug, especially when people don't expect that kind of cause.
It would be ok to submit a patch solving this issue using C code IMHO. Note the maxsize argument complicates things even though most uses of Queue don't use maxsize. Of course, the general issue isn't only about Queue: other synchronization primitives are widely used. See https://github.com/tornadoweb/tornado/pull/1876 for an example. ---------- nosy: +pitrou resolution: wont fix -> stage: -> needs patch type: crash -> behavior versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14976> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com