Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(594)

Issue 52320045: New asyncio.subprocss module (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by haypo_gmail
Modified:
12 years ago
Reviewers:
GvR
Visibility:
Public.

Description

New asyncio.subprocss module

Patch Set 1 #

Patch Set 2 : proactor issues fixed #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -14 lines) Patch
M asyncio/__init__.py View 1 2 chunks +2 lines, -0 lines 0 comments Download
M asyncio/proactor_events.py View 1 5 chunks +21 lines, -13 lines 3 comments Download
A asyncio/subprocess.py View 1 1 chunk +199 lines, -0 lines 0 comments Download
M examples/child_process.py View 1 chunk +3 lines, -1 line 0 comments Download
A examples/shell.py View 1 chunk +50 lines, -0 lines 0 comments Download
A examples/subprocess_shell.py View 1 chunk +85 lines, -0 lines 0 comments Download
A tests/test_subprocess.py View 1 chunk +196 lines, -0 lines 0 comments Download

Messages

Total messages: 1
GvR
12 years ago (2014-02-01 06:29:04 UTC) #1
https://codereview.appspot.com/52320045/diff/80001/asyncio/proactor_events.py
File asyncio/proactor_events.py (right):

https://codereview.appspot.com/52320045/diff/80001/asyncio/proactor_events.py...
asyncio/proactor_events.py:71: self._write_fut = self._read_fut = None
Shouldn't you set _pending_write = 0 here too?

In general I am a little worried about the code that updates _pending_write --
it looks like a future change in logic might all too easily break the invariant
by forgetting to update it at some point. I think it would be worth a comment in
__init__, moving the two variables (_write_fut and _pending_write) closer
together, and doing an audit of all places where either is changed to make sure
the other is changed also.

https://codereview.appspot.com/52320045/diff/80001/asyncio/proactor_events.py...
asyncio/proactor_events.py:256: self._pending_write = 0
I'd move this out of the 'if'.

https://codereview.appspot.com/52320045/diff/80001/asyncio/proactor_events.py...
asyncio/proactor_events.py:280: # May resume the protocol if the buffer is empty
I'm not sure this comment is needed -- what happens on the next tick isn't our
concern here, and obviously _loop_writing() can change everything.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b