Skip to content

Instantly share code, notes, and snippets.

@SeongUgJung
Last active August 6, 2019 16:40
Show Gist options
  • Save SeongUgJung/2c7e22c7e40251e8b0b3fb3441845bd0 to your computer and use it in GitHub Desktop.
Save SeongUgJung/2c7e22c7e40251e8b0b3fb3441845bd0 to your computer and use it in GitHub Desktop.
lifecycle dispose
Observable.interval(100) // every 100 ms
.flatMap { api.data() } // network request
.compose(until(PAUSE)) // dispose when onPause
.subscribe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment