This commit is contained in:
Scotty Simpson 2018-03-03 20:44:34 -08:00 committed by GitHub
parent e25f086061
commit 0fc9b6ed07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -384,7 +384,7 @@ var added = stream.combine(function(a, b) {
console.log(added()) // logs 12
```
A stream can depend on any number of streams and it's guaranteed to update atomically. For example, if a stream A has two dependent streams B and C, and a fourth stream D is dependent on both B and C, the stream D will only update once if the value of A changes. This guarantees that the callback for stream D is never called with unstable values such as when B has a new value but C has the old value. Atomicity also bring the performance benefits of not recomputing downstreams unnecessarily.
A stream can depend on any number of streams and it's guaranteed to update atomically. For example, if a stream A has two dependent streams B and C, and a fourth stream D is dependent on both B and C, the stream D will only update once if the value of A changes. This guarantees that the callback for stream D is never called with unstable values such as when B has a new value but C has the old value. Atomicity also brings the performance benefits of not recomputing downstreams unnecessarily.
You can prevent dependent streams from being updated by returning the special value `stream.HALT`