tornadoweb / tornadoweb/tornado
Add a timeout argument to read_until_* methods
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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