Eric N
1 min readSep 12, 2018

--

This scheduler runs the code on current thread. So if you have a code running on the main thread, this scheduler will add the code block on the queue of main thread. It is quite similar to Immediate Scheduler as it also blocks the thread, however, it waits for the current task to execute completely(while ImmediateScheduler invokes the task right away). Trampoline schedulers come in handy when we have more than one observable and we want them to execute in order

I personally only use it in unit testing, replacing the good old immediate() :)

https://www.aanandshekharroy.com/articles/2018-01/rxjava-schedulers

--

--