mg6maciej
03/14/2017, 2:26 PM.map { ... }, but abuse it and access some shared state from within. It's simple to make a code that calls function inside map from 2 different threads, e.g.:
Observable.zip(
obsA.subscribeOn(io()),
obsB.subscribeOn(io()),
BiFunction { a: Any, b: Any -> / * modify shared state */ })
.map { / * modify shared state */ }
.doOnNext { / * modify shared state */ }
.subscribe()