Message269001
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. |
|
Date |
User |
Action |
Args |
2016-06-21 14:22:33 | martin.panter | set | recipients:
+ martin.panter, pitrou, christian.heimes, panzi |
2016-06-21 14:22:33 | martin.panter | set | messageid: <1466518953.44.0.505864969463.issue9156@psf.upfronthosting.co.za> |
2016-06-21 14:22:33 | martin.panter | link | issue9156 messages |
2016-06-21 14:22:33 | martin.panter | create | |
|