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
Or I not right understood?
P.S. I love your books, very thanks for your hard works.