Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(250)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 116970044: Convert StreamWriter.drain() to a classic coroutine

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by haypo_gmail
Modified:
11 years, 5 months ago
Reviewers:
GvR
Visibility:
Public.
Convert StreamWriter.drain() to a classic coroutine

Patch Set 1 #

Patch Set 2 : _make_drain_waiter() is now a coroutine and handle "connection lost" error #

Total comments: 2

Patch Set 3 : rename helper to _drain_helper() and attribute to _connection_lost #

Created: 11 years, 5 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -19 lines) Patch
M asyncio/streams.py View 1 2 5 chunks +18 lines, -19 lines 0 comments Download
Total messages: 3
|
GvR
I think the basic idea is sound, I am just not 100% sure about the ...
11 years, 5 months ago (2014年07月21日 22:36:12 UTC) #1
I think the basic idea is sound, I am just not 100% sure about the right class
structure, since this is a Mixin class.
https://codereview.appspot.com/116970044/diff/20001/asyncio/streams.py
File asyncio/streams.py (right):
https://codereview.appspot.com/116970044/diff/20001/asyncio/streams.py#newcod...
asyncio/streams.py:144: StreamWriter.drain() must wait for _make_drain_waiter()
coroutine.
I propose to rename _make_drain_waiter() to _drain_helper(), just so that code
that was calling or overriding it will break in an obvious way. (The original
text of the docstring suggests that this is a "_protected" method.)
Or maybe we should just make the helper a public method introduced by this mixin
class? I don't like the "_protected" convention much...
https://codereview.appspot.com/116970044/diff/20001/asyncio/streams.py#newcod...
asyncio/streams.py:295: This method is a coroutine.
You don't have to say that, the decorator already says it.
Sign in to reply to this message.
haypo_gmail
New version addressing last comments.
11 years, 5 months ago (2014年07月21日 22:46:48 UTC) #2
New version addressing last comments.
Sign in to reply to this message.
GvR
LGTM. (On second thought this is good enough.)
11 years, 5 months ago (2014年07月21日 23:23:27 UTC) #3
LGTM.
(On second thought this is good enough.)
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /