June 2017
Intermediate to advanced
400 pages
8h 44m
English
Schedulers.trampoline() is an interesting Scheduler. In practicality, you will not invoke it often as it is used primarily in RxJava's internal implementation. Its pattern is also borrowed for UI Schedulers such as RxJavaFX and RxAndroid. It is just like default scheduling on the immediate thread, but it prevents cases of recursive scheduling where a task schedules a task while on the same thread. Instead of causing a stack overflow error, it will allow the current task to finish and then execute that new scheduled task afterward.
Read now
Unlock full access