[New-bugs-announce] [issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

Fulvio Esposito report at bugs.python.org
Thu Apr 21 13:34:01 EDT 2016


New submission from Fulvio Esposito:

Calling pause_reading()/resume_reading() on a _ProactorReadPipeTransport will result in an InvalidStateError('Result is not ready.') from a future if no read has been issued yet. The reason is that resume_reading() will schedule _loop_reading() a second time on the event loop. For example, currently aiomysql always fails to connect using a ProactorEventLoop on Windows because it calls pause_reading()/resume_reading() to set TCP_NODELAY on the socket just after connecting and before any read is performed.

----------
components: asyncio
files: pause_resume_test.py
messages: 263927
nosy: Fulvio Esposito, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42559/pause_resume_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26819>
_______________________________________


More information about the New-bugs-announce mailing list