This commit is contained in:
shikong 2024-05-05 17:27:05 +08:00
parent c50667380a
commit 8cb8f43756

View File

@ -157,7 +157,8 @@ public class RxJavaStudyStarterTest {
Thread.sleep(200);
emitter.onNext("World");
emitter.onComplete();
}, BackpressureStrategy.LATEST);
}, BackpressureStrategy.LATEST)
.subscribeOn(Schedulers.io());
// 缓存数据
observable = observable.cacheWithInitialCapacity(1);