Created
May 16, 2016 10:49
-
-
Save xicmiah/bfcf9dac0c74db8904018b37a5e3b96a to your computer and use it in GitHub Desktop.
Leak example for Observable#firstL
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
import monix.execution.Scheduler | |
import monix.reactive.Observable | |
object LeakSample { | |
def main(args: Array[String]) { | |
implicit val scheduler = Scheduler.computation(2) | |
val hotObservable = (1 +: Observable.never).behavior(0) | |
hotObservable.connect() | |
val task = hotObservable.firstL | |
while (true) task.runAsync(_ => {}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment