Last active
March 24, 2019 17:56
-
-
Save baldraider/530730c5010168b71e3bc205196ff388 to your computer and use it in GitHub Desktop.
Relay Subject Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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