DescriptionMojo: 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 #
Messages
Total messages: 3 (0 generated)
|