Chromium Code Reviews
DescriptionMake _FutureImpl._chain do path shortening on listeners.
A chained future is one that will give exactly the same result as another
future. It is used to handle, e.g., futures returned by .then handlers.
Currently we chaing futures by simply making the future itself a listener
on the future it is chained to.
This change makes the future move all its listeners to the future it is
chained to, and forward future listeners as well. It avoids long chains of
futures depending on each other.
Effectively, chained futures form equivalence classes. This makes the
equivalence classess all be represented by the future that every other element
depends on, and it applies path shortening to make the dependency graph as
flat as possible.
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=23807
Patch Set 1 #
Total comments: 1
Patch Set 2 : Address cyclic future dependencies #Patch Set 3 : Now complete with error if there are cyclic dependencies. #
Messages
Total messages: 7 (0 generated)
|
||||||||||||||||||||||||||||