Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.48k stars 2.1k forks source link

fromNodeCallback is hot observable, should be cold #1044

Open sfescape opened 8 years ago

sfescape commented 8 years ago

I see from a closed issue in 2013 that fromNodeCallback should be a cold observable. But the current version is not cold. I have to convert it to cold by doing something like:

fn = rx.Observable.fromNodeCallback(x)

var obs = rx.Observable.just(1).flatMap(function() { return fn() })

Is this intended?

alexanderGugel commented 8 years ago

There seems to be a more recent issue (#818). Maybe this should be discussed there. Either way, I agree with you. It should definitely be a cold observable.