Closed DartBot closed 9 years ago
Comment by jmesserly
Do you think it would be possible to implement such a safeguard for this code ?
doubtful, since there is nothing global to coordinate on. Introducing a global coordination would probably make it difficult to implement ChangeNotifier (it's just an interface) and/or adversely affect performance. I'm open to ideas but it's not clear to me how to fix it.
It is unfortunately like any other infinite loop in Dart, or infinite series of async operations. I find debugging infinite loops in Dartium to be super hard, since debug tools can't reliably cause the code to break, so definitely sympathize on that. I wonder if we could improve the tools or somehow improve this more globally in Dart, perhaps by having a debug Zone that breaks after so many async ops, or makes it easier to set a breakpoint, or something along those lines.
Added PatchesWelcome label.
Comment by jmesserly
(it's just an interface)
it's actually a mixin ... what I meant by that is: it's intended to be usable as just an interface.
Comment by sigmundch
Added this to the Later milestone. Removed Priority-Unassigned label. Added Priority-Low label.
Comment by jmesserly
inclined to say this is not in the cards. but pull requests welcome @ https://github.com/dart-lang/observe
Added NotPlanned label.
Issue by vicb Originally opened as dart-lang/sdk#19472
When using an Observable, there is a safeguard in dirtyCheckObservables() to make sure the code does not enter an infinite loop.
There is no such safeguard in the ChangeNotifier and it might lead to an infinite loop:
var list = new ObservableList(); var depList = new ObservableList();
list.changes.listen((records) { depList.add('change'); });
depList.changes.listen((records) { list.add('change'); });
Do you think it would be possible to implement such a safeguard for this code ?