Rx.Observable.prototype.controlled([enableQueue])
Attaches a controller to the observable sequence with the ability to queue.
Arguments
[enableQueue]
(Boolean): Whether to enable queueing. If not specified, defaults to true.
Returns
(Observable
): An observable sequence which can be used to request values from the sequence.
Example
var source = Rx.Observable.range(0, 10).controlled();
var subscription = source.subscribe(
function (x) {
console.log('Next: ' + x.toString());
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
source.request(2);
// => Next: 0
// => Next: 1
Location
File:
Dist:
Prerequisites:
- If using
rx.backpressure.js
NPM Packages:
NuGet Packages:
Unit Tests: