Issue 30996: add coroutine AbstractEventLoop.sock_close (original) (raw)

Issue30996

Created on 2017-07-23 09:30 by cfy, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
asyncio_wait_forever.py cfy,2017-07-23 09:30
Messages (2)
msg298894 - (view) Author: Fengyuan Chen (cfy) Date: 2017-07-23 09:30
I suppose asyncio lack async version of sock_close that can call loop.remove_reader and others before close socket and perhaps lack something like coroutine AbstractEventLoop.sock_make_blocking that can do some deregister job. switch constant in the script: * change CALL_REMOVE_READING_BEFORE_CLOSE to True will make script running smoothly * change USE_UVLOOP to True will make script use uvloop
msg308863 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-21 09:37
Well, removing the reader on future cancellation makes sense. Can be done by add_done_callback(). Yury, what do you think?
History
Date User Action Args
2022-04-11 14:58:49 admin set github: 75179
2017-12-21 09:37:37 asvetlov set nosy: + asvetlovmessages: + versions: + Python 3.7
2017-07-23 09:30:07 cfy create