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

Issue 129163003: Mojo: DataPipe: Implement "may discard" for two-phase writes. (Closed)

Created:
6 years, 11 months ago by viettrungluu
Modified:
6 years, 11 months ago
CC:
chromium-reviews, Aaron Boodman, darin (slow to review), viettrungluu+watch_chromium.org, ben+mojo_chromium.org, abarth-chromium
Visibility:
Public.

Description

Mojo: DataPipe: Implement "may discard" for two-phase writes. Arguably more importantly, make data pipe producers not writable during two-phase writes and consumers not readable during two-phase reads. This allows multiple threads to simultaneously use the two-phase APIs in a sane way; they can respond to a "busy" error by waiting. (Why not "should wait" instead of "busy"? Because waiting is only an appropriate response if you know that someone else is going to end the two-phase read/write -- e.g., if a two-phase read/write is happening on another thread.) Also refactor the waiter-awakening stuff so that it's taken care of by the DataPipe superclass, rather than the LocalDataPipe implementation subclass. Note that a two-phase write will only discard if "all-or-none" is requested. Otherwise, as usual, it'll provide as much space as available. R=darin@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243920

Patch Set 1 #

Patch Set 2 : oops #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -156 lines) Patch
M mojo/system/data_pipe.h View 4 chunks +5 lines, -3 lines 0 comments Download
M mojo/system/data_pipe.cc View 1 9 chunks +35 lines, -5 lines 0 comments Download
M mojo/system/local_data_pipe.h View 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/system/local_data_pipe.cc View 10 chunks +38 lines, -54 lines 0 comments Download
M mojo/system/local_data_pipe_unittest.cc View 7 chunks +355 lines, -94 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
viettrungluu
6 years, 11 months ago (2014-01-08 21:15:56 UTC) #1
darin (slow to review)
LGTM
6 years, 11 months ago (2014-01-09 08:09:29 UTC) #2
viettrungluu
6 years, 11 months ago (2014-01-09 17:38:32 UTC) #3
Message was sent while issue was closed.
Committed patchset #2 manually as r243920 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698