Safe update for 2 dependent streams
问题 As an exercise I'm trying to build 2 dependent streams which update one another. The test application is simply an "Inches <-> Centimeters" converter, with both inputs editable. The issue I am experiencing is that I cannot get how can I stop recursion that causes one field change. To better explain the issue let's have a look at the relevant part of code: var cmValue = new Rx.BehaviorSubject(0), inValue = new Rx.BehaviorSubject(0); # handler #1 cmValue.distinctUntilChanged().subscribe