[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
* change CALL_REMOVE_READING_BEFORE_CLOSE to True will make script running 
smoothly
* change USE_UVLOOP to True will make script use uvloop

--
components: asyncio
files: asyncio_wait_forever.py
messages: 298894
nosy: cfy, yselivanov
priority: normal
severity: normal
status: open
title: add coroutine AbstractEventLoop.sock_close
type: resource usage
versions: Python 3.6
Added file: http://bugs.python.org/file47034/asyncio_wait_forever.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com