Chromium Code Reviews
DescriptionChange and structure how Stream implementations do callbacks.
Callbacks are the on-pause/subscription-state change calls from a stream.
Now a callback is an atomic operation. State changes happening during a callback
will not trigger a new callback before the old one is done. If the state is
changed during the callback, another callback will follow immediately.
Firing of events is also atomic, so a callback will not happend during an event
being fired, but will be triggered afterwards if the state was changed by the
event handlers.
A stream controller (or any other listener for callbacks) will not be told
immediately if a paused stream is resumed. If there are pending events in the
queue, those will be fired before the controller is considerered resumed.
A canceled subscription will immediately stop getting events.
Previously it would get the current event being fired, but it's more rational
to not get events after you have said you don't want them, instead of having
the handlers have to discard events after a cancel.
Committed: https://code.google.com/p/dart/source/detail?r=19379
Patch Set 1 #
Total comments: 23
Patch Set 2 : Address review comments. #
Messages
Total messages: 4 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||