Skip to content

Instantly share code, notes, and snippets.

@rohmanhakim
Last active November 17, 2018 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohmanhakim/162fe2ec9c93fc10633b0bf3540f2094 to your computer and use it in GitHub Desktop.
Save rohmanhakim/162fe2ec9c93fc10633b0bf3540f2094 to your computer and use it in GitHub Desktop.
val observable = Observable.just("some event")
.map {
Thread.sleep(randomInt())
System.currentTimeMillis()
}
val sub1 = observable.subscribe({ println("sub1 got : $it") },{})
val sub2 = observable.subscribe({ println("sub2 got : $it") },{})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment