Skip to content

Instantly share code, notes, and snippets.

@micHar
Last active September 19, 2017 07:48
Show Gist options
  • Save micHar/a519fdd1387fe8dabb3b1e29deba6072 to your computer and use it in GitHub Desktop.
Save micHar/a519fdd1387fe8dabb3b1e29deba6072 to your computer and use it in GitHub Desktop.
Completable.fromCallable { animalsMaker.makeCat(getThread()) }
.doOnComplete { animalsMaker.makeDog(getThread()) }
.observeOn(scheduler(FISH))
.andThen(Completable.fromCallable { animalsMaker.makeShark(getThread()) })
.andThen(
Completable.fromCallable { animalsMaker.makeChicken(getThread()) }
.subscribeOn(scheduler(BIRDS))
.andThen(Completable.fromCallable { animalsMaker.makeDuck(getThread()) })
)
.andThen(Completable.fromCallable { animalsMaker.makePenguin(getThread()) })
.subscribeOn(scheduler(MAMMALS))
.subscribeOn(scheduler(AMPHIBIANS))
.observeOn(scheduler(REPTILES))
.doOnComplete { animalsMaker.makeCrocodile(getThread()) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment