python / cpython

The Python programming language
https://www.python.org
Other
63.49k stars 30.4k forks source link

asyncio: refactor StreamReader #67387

Closed vstinner closed 9 years ago

vstinner commented 9 years ago
BPO 23198
Nosy @gvanrossum, @vstinner, @1st1
Files
  • refactor_streamreader.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['expert-asyncio'] title = 'asyncio: refactor StreamReader' updated_at = user = 'https://github.com/vstinner' ``` bugs.python.org fields: ```python activity = actor = 'vstinner' assignee = 'none' closed = True closed_date = closer = 'vstinner' components = ['asyncio'] creation = creator = 'vstinner' dependencies = [] files = ['37649'] hgrepos = [] issue_num = 23198 keywords = ['patch'] message_count = 3.0 messages = ['233700', '233738', '233975'] nosy_count = 4.0 nosy_names = ['gvanrossum', 'vstinner', 'python-dev', 'yselivanov'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue23198' versions = ['Python 3.4', 'Python 3.5'] ```

    vstinner commented 9 years ago

    Attached patch refactors the asyncio.StreamReader class:

    The change adds a subgenerator (_wait_for_data), is it an issue in term of performances? (I don't think so.)

    vstinner commented 9 years ago

    See also this feature request: "StreamReader needs a timeout" https://code.google.com/p/tulip/issues/detail?id=96

    1762cc99-3127-4a62-9baf-30c3d0f51ef7 commented 9 years ago

    New changeset 94a6f9a3580e by Victor Stinner in branch '3.4': Issue bpo-23198: Reactor asyncio.StreamReader https://hg.python.org/cpython/rev/94a6f9a3580e