[issue26590] socket destructor: implement finalizer

STINNER Victor report at bugs.python.org
Mon Mar 21 06:53:20 EDT 2016


STINNER Victor added the comment:

> Now that there is a safe finalizer, I wonder if it should release the GIL, as in sock_close().

Ah yes, good idea. I updated my patch.

I also changed the change to begin by setting the sock_fd attribute to -1, before closing the socket (since the GIL is now released, the order matters).

----------
Added file: http://bugs.python.org/file42230/sock_finalize-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26590>
_______________________________________


More information about the Python-bugs-list mailing list