[issue30996] add coroutine AbstractEventLoop.sock_close

2017-12-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: Well, removing the reader on future cancellation makes sense. Can be done by add_done_callback(). Yury, what do you think? -- nosy: +asvetlov versions: +Python 3.7 ___ Python tracker

[issue30996] add coroutine AbstractEventLoop.sock_close

2017-07-23 Thread Fengyuan Chen
New submission from Fengyuan Chen: 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: