Last active
May 24, 2018 09:48
-
-
Save kvvzr/e9d264adc7a1314093a418c33e838418 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val subject = PublishSubject.create<Int>() | |
// 処理が終わらない | |
subject | |
.subscribeOn(Schedulers.trampoline()) // テストコードではRxJavaPluginsによってtrampolineがsetされる | |
.buffer(1, TimeUnit.SECONDS) | |
.filter { it.isNotEmpty() } | |
.subscribe { buffers -> println(buffers) } | |
// これは大丈夫 | |
subject | |
.subscribeOn(Schedulers.trampoline()) | |
.subscribe { value -> println(value) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment