Antoine Pitrou added the comment: To elaborate a bit on the patch: - it is pointless to call flush() if the buffered is in a bad state (self->ok == 0) or it has started finalizing already - you need to own the reference, since flush() can release the GIL and, if the reference is borrowed, the refcount can fall to 0 in another thread and the whole object deallocated under your feet
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17852> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com