Martin Panter added the comment: IMO closing an OS-level file descriptor in one thread while it is in use by another thread is a bad idea, full of race conditions and undefined behaviour. An AttributeError sounds like a best-case scenario. It is like freeing a memory allocation in one thread while another thread is accessing the memory. What if the other thread was slow, or a syscall was interrupted, and hasn’t (re-)started the recv() call in time? What if a third thread opens a file and reuses the file descriptor you just closed?
I suggest to close this. ---------- nosy: +martin.panter resolution: -> rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9156> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com