0

I am trying to figure out if the following is possible with any of the existing operators in RxJS, or if I need to roll my own extension:

var x = // some observable sequence 
var y = // some observable sequence 
var z = // some observable sequence 

// 'when' should only call onNext when all of x, y and z has returned at 
// least one value. After that, 'when' should continue to call onNext if
// any of x, y, z changes their value.
var w = Rx.Observable.when(x, y, z).select(function(x, y, z) {
    // do stuff values of from z, y, x.
});

Best, Egil.

Egil Hansen
  • 15,028
  • 8
  • 37
  • 54

1 Answers1

1

Looks like I figured it out myself :)

The combineLatest instance function does exactly what I need.

Egil Hansen
  • 15,028
  • 8
  • 37
  • 54
  • 1
    You might be interested in Join Patterns too: http://stackoverflow.com/questions/3867858/reactive-extensions-for-net-rx-take-action-once-all-events-are-completed – raimohanska Apr 24 '13 at 20:49