gh-109370: Support closing Connection and PipeConnection from other thread#109397
gh-109370: Support closing Connection and PipeConnection from other thread#109397serhiy-storchaka wants to merge 1 commit into
Conversation
|
I do not like this.
I have not tested the code on Windows yet, very likely more try/exept or return code checks should be added in Windows specific code. |
Sorry, something went wrong.
|
The more I look at this, the more I dislike it. I do not see how is it possible to safely close a file descriptor on other thread without locking. Making Connection and PipeConnection truly thread-safe in a task on completely different level. I opened #109780 instead. |
Sorry, something went wrong.
Maybe we should just give up and document that they are not thread-safe. I recall that I did that once on some asyncio classes. |
Sorry, something went wrong.
edited by bedevere-app
Bot
LoadingUh oh!
There was an error while loading. Please reload this page.
Copy link Copy MarkdownSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.