Skip to content

Instantly share code, notes, and snippets.

@baldraider
Last active March 24, 2019 17:56
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 baldraider/530730c5010168b71e3bc205196ff388 to your computer and use it in GitHub Desktop.
Save baldraider/530730c5010168b71e3bc205196ff388 to your computer and use it in GitHub Desktop.
Relay Subject Example
class RelaySubjectExample1 {
fun main(args : Array<String>){
val subject = RelaySubject<String>()
val myObserver = MyObserver()
subject.onNext("a")
subject.subscribe(myObserver)
subject.onNext("b")
subject.onNext("c")
subject.onComplete()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment