This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: asyncio: refactor StreamReader
Type: Stage:
Components: asyncio Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, python-dev, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2015-01-09 00:41 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
refactor_streamreader.patch vstinner, 2015-01-09 00:41 review
Messages (3)
msg233700 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-01-09 00:41
Attached patch refactors the asyncio.StreamReader class:

- use the value None instead of True or False to wake up the waiter
- add a new _wakeup_waiter() method
- replace _create_waiter() method with a _wait_for_data() coroutine function

The change adds a subgenerator (_wait_for_data), is it an issue in term of performances? (I don't think so.)
msg233738 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-01-09 09:02
See also this feature request:
"StreamReader needs a timeout"
https://code.google.com/p/tulip/issues/detail?id=96
msg233975 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-01-13 23:54
New changeset 94a6f9a3580e by Victor Stinner in branch '3.4':
Issue #23198: Reactor asyncio.StreamReader
https://hg.python.org/cpython/rev/94a6f9a3580e
History
Date User Action Args
2022-04-11 14:58:11adminsetgithub: 67387
2015-01-14 00:52:53vstinnersetstatus: open -> closed
resolution: fixed
2015-01-13 23:54:50python-devsetnosy: + python-dev
messages: + msg233975
2015-01-09 09:02:50vstinnersetmessages: + msg233738
2015-01-09 00:41:19vstinnercreate