This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients christian.heimes, martin.panter, panzi, pitrou
Date 2016-06-21.14:22:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466518953.44.0.505864969463.issue9156@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-06-21 14:22:33martin.pantersetrecipients: + martin.panter, pitrou, christian.heimes, panzi
2016-06-21 14:22:33martin.pantersetmessageid: <1466518953.44.0.505864969463.issue9156@psf.upfronthosting.co.za>
2016-06-21 14:22:33martin.panterlinkissue9156 messages
2016-06-21 14:22:33martin.pantercreate