Chromium Code Reviews
DescriptionImprove the event handling for string input stream
1. The string input stream now calls the data or line handler if there
is still data available after returning from the data or line
handler. These callbacks are scheduled on the event loop.
2. The reading of data is now throtteld so that calls to read or
readLine will not eagerly try to read from the wrapped input
stream. After each call to read the data handler is installed if
no more buffered data is available. Also when the data handler
is called the data handler on the wrapped input stream is
un-installed if no more data is required for the current data or
line handler.
One side effect of this change is that just reading from an input
stream obtained from a file is no longer possible. One will have to
set up a data handler callback of some kind before any calls to read
will return data. We can of cause change this to allow synchronous
usage of an input stream obtained from a file (maybe with an optional
argument to openInputStream).
Fixed a related throtteling issue with the chunked input stream.
R=ager@google.com
BUG=
TEST=
Committed: https://code.google.com/p/dart/source/detail?r=2310
Patch Set 1 #
Total comments: 2
Patch Set 2 : Updated the Dart test runner to work with the file input stream changes #
Total comments: 4
Patch Set 3 : rebased #
Messages
Total messages: 5 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||