tornadoweb / tornadoweb/tornado

Add a timeout argument to read_until_* methods

Open
#1,886 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

iostream
Dominant language
Python
Stars
22.2k
Forks
5.6k
Avg merge
3h 42m
Merged PRs (30d)
16

Description

...so that one can do:

    @gen.coroutine
    def handle_stream(self, stream, address):
        while True:
            try:
                data = yield stream.read_until(b"\r\n", timeout=30)
            except TimeoutError:
                print("no data was received in 30 secs")
                break

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the stream.read_until entry point and the related read_until_* methods. Clarify how a timeout should interact with the coroutine and TimeoutError, then verify the requested example and timeout behavior with focused tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.