Please correct me if I am wrong somewhere.
Observers and observers are mainly associated with the task - Observe (expect data) and sign (so that observers receive the data that was clicked).
Observable provides two statements to improve the performance of the above two tasks.
one). Observable.ObserveOn - asynchronously notify the observer according to the specified schedule. The task can be performed better using Schedular, where it takes an argument either
- Scheduler.CurrentThread (Pay attention to the current current thread)
- Scheduler.NewThread (watch every time in a new thread)
- Scheduler.TaskPool (note the TaskPool mechanism, I think you might be interested.)
- Scheduler.ThreadPool (note the ThreadPool mechanism)
the same for the second ....
2). Observable.SubscribeOn - subscribe asynchronously - unsubscribe observers on specific schedulers.
It also has the same options as above to schedule a subscription.
In this way, Rx provides built-in capabilities to plan your process for quick results.
Jsinh Aug 02 2018-11-11T00: 00Z
source share