Skip to content

Commit

Permalink
docs(scheduler): update scheduling behavior description
Browse files Browse the repository at this point in the history
  • Loading branch information
simpzan authored and kwonoj committed May 20, 2016
1 parent 9b4c5d8 commit b7ca78a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ got value 3
done
```

Notice how the notifications `got value...` were delivered after `just before subscribe`, which is different to the default behavior we have seen so far. This is because `observeOn(Rx.Scheduler.async)` introduces a proxy Observer between `Observable.create` and the final Observer. Let's rename some identifiers to make that distinction obvious in the example code:
Notice how the notifications `got value...` were delivered after `just after subscribe`, which is different to the default behavior we have seen so far. This is because `observeOn(Rx.Scheduler.async)` introduces a proxy Observer between `Observable.create` and the final Observer. Let's rename some identifiers to make that distinction obvious in the example code:

```js
var observable = Rx.Observable.create(function (proxyObserver) {
Expand Down Expand Up @@ -124,4 +124,4 @@ Time-related operators like `bufferTime`, `debounceTime`, `delay`, `auditTime`,

Other instance operators that take a Scheduler as argument: `cache`, `combineLatest`, `concat`, `expand`, `merge`, `publishReplay`, `startWith`.

Notice that both `cache` and `publishReplay` accept a Scheduler because they utilize a ReplaySubject. The constructor of a ReplaySubjects takes an optional Scheduler as the last argument because ReplaySubject may deal with time, which only makes sense in the context of a Scheduler. By default, a ReplaySubject uses the `queue` Scheduler to provide a clock.
Notice that both `cache` and `publishReplay` accept a Scheduler because they utilize a ReplaySubject. The constructor of a ReplaySubjects takes an optional Scheduler as the last argument because ReplaySubject may deal with time, which only makes sense in the context of a Scheduler. By default, a ReplaySubject uses the `queue` Scheduler to provide a clock.

0 comments on commit b7ca78a

Please sign in to comment.