Logical mistyping, book's version 4, chapter 15, page 341(pdf vesion)

Original text:

Blockquote
What if you want to generate animals on the global queue, but receive them on the Main Thread? For the first case, the observeOn is already correct, but for the second it’s necessary to use subscribeOn.

Replace the animal subscription, this time with the following:

animal 
    .subscribeOn(MainScheduler.instance) 
    .dump()
    .observeOn(globalScheduler) 
    .dumpingSubscription()
    .disposed(by: bag)

If we want to generate animals on the global queue, but receive on Main, we need to write
.subscribeOn(globalScheduler)
.observeOn(MainScheduler.instance)

Or I not right understood?

P.S. I love your books, very thanks for your hard works.

This topic was automatically closed after 166 days. New replies are no longer allowed.