Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Issue 952223002: Add Python util to read from a data pipe into a bytearray (Closed)

Created:
5 years, 10 months ago by blundell
Modified:
5 years, 9 months ago
Reviewers:
qsr
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add Python util to read from a data pipe into a bytearray The implementation of this function is inspired by //mojo/common/data_pipe_utils.cc. It will be used in an upcoming CL. R=qsr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/c0d8adda0cccb7042fc641e5fbaa7a2f6198aaa3

Patch Set 1 #

Patch Set 2 : Add comments #

Total comments: 9

Patch Set 3 : Response to review #

Total comments: 2

Patch Set 4 : Move to AsyncWait, add tests #

Total comments: 8

Patch Set 5 : Response to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, --1 lines) Patch
M mojo/python/BUILD.gn View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A + mojo/python/mojo_utils/__init__.py View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A mojo/python/mojo_utils/data_pipe_utils.py View 1 2 3 4 1 chunk +76 lines, -0 lines 0 comments Download
A mojo/python/tests/data_pipe_utils_unittest.py View 1 2 3 4 1 chunk +96 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
blundell
Hi Ben, I'm looking at bringing up unittests; could you review the production code in ...
5 years, 10 months ago (2015-02-25 15:04:30 UTC) #2
qsr
https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py File mojo/python/mojo_utils/data_pipe_utils.py (right): https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py#newcode14 mojo/python/mojo_utils/data_pipe_utils.py:14: BUFFER_SIZE = 1000 Use a power of 2, usual ...
5 years, 10 months ago (2015-02-25 15:22:36 UTC) #3
qsr
On 2015/02/25 15:22:36, qsr wrote: > https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py > File mojo/python/mojo_utils/data_pipe_utils.py (right): > > https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py#newcode14 > ...
5 years, 10 months ago (2015-02-26 09:25:02 UTC) #4
blundell
Added a method that returns a Promise. https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py File mojo/python/mojo_utils/data_pipe_utils.py (right): https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py#newcode14 mojo/python/mojo_utils/data_pipe_utils.py:14: BUFFER_SIZE = ...
5 years, 10 months ago (2015-02-26 16:33:53 UTC) #5
qsr
https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py File mojo/python/mojo_utils/data_pipe_utils.py (right): https://codereview.chromium.org/952223002/diff/20001/mojo/python/mojo_utils/data_pipe_utils.py#newcode28 mojo/python/mojo_utils/data_pipe_utils.py:28: continue On 2015/02/26 16:33:53, blundell wrote: > On 2015/02/25 ...
5 years, 10 months ago (2015-02-26 16:45:19 UTC) #6
blundell
https://codereview.chromium.org/952223002/diff/40001/mojo/python/mojo_utils/data_pipe_utils.py File mojo/python/mojo_utils/data_pipe_utils.py (right): https://codereview.chromium.org/952223002/diff/40001/mojo/python/mojo_utils/data_pipe_utils.py#newcode17 mojo/python/mojo_utils/data_pipe_utils.py:17: def GenerationMethod(resolve, reject): On 2015/02/26 16:45:19, qsr wrote: > ...
5 years, 9 months ago (2015-03-03 16:04:39 UTC) #8
qsr
https://codereview.chromium.org/952223002/diff/80001/mojo/python/mojo_utils/data_pipe_utils.py File mojo/python/mojo_utils/data_pipe_utils.py (right): https://codereview.chromium.org/952223002/diff/80001/mojo/python/mojo_utils/data_pipe_utils.py#newcode41 mojo/python/mojo_utils/data_pipe_utils.py:41: return self.original_deadline - elapsed_time You probably want a max(0, ...
5 years, 9 months ago (2015-03-03 17:10:37 UTC) #9
blundell
Thanks! https://codereview.chromium.org/952223002/diff/80001/mojo/python/mojo_utils/data_pipe_utils.py File mojo/python/mojo_utils/data_pipe_utils.py (right): https://codereview.chromium.org/952223002/diff/80001/mojo/python/mojo_utils/data_pipe_utils.py#newcode41 mojo/python/mojo_utils/data_pipe_utils.py:41: return self.original_deadline - elapsed_time On 2015/03/03 17:10:36, qsr ...
5 years, 9 months ago (2015-03-04 10:28:53 UTC) #10
qsr
lgtm
5 years, 9 months ago (2015-03-04 10:35:47 UTC) #11
blundell
5 years, 9 months ago (2015-03-04 12:32:03 UTC) #12
Message was sent while issue was closed.
Committed patchset #5 (id:100001) manually as
c0d8adda0cccb7042fc641e5fbaa7a2f6198aaa3 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698