Consider this example:
observable
.Where(somePredicate)
.ObserveOn(TaskPoolScheduler.Default)
.SubscribeOn(TaskPoolScheduler.Default)
.Subscribe(x => { });
Is the Where()
executed in the task pool, or only the subscribe func?
Following on:
var newObservable = observable.
.Where(somePredicate)
.ObserveOn(TaskPoolScheduler.Default)
.SubscribeOn(TaskPoolScheduler.Default);
newObservable.Subscribe(x => { });
newObservable.Subscribe(x => { });
In this example, do both subscriptions retain the concurrency settings of newObservable
? In that sense, can the creator of an observable define a different concurrency default (vs the Rx default) and pass it on to users of the observable, unless overriden?
Edit:
Now, if:
newObservable
.Where(somePredicate2)
.Subscribe(x => { })
Is this now executed on the task pool too?