We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private Observable getObservable() { return Observable.create(new ObservableOnSubscribe() { @OverRide public void subscribe(ObservableEmitter emitter) throws Exception { // send events with simulated time wait //下面的注释是作者原注释,我觉得不太对,因为这个运行的结果是1,3,7被发送出来了 Thread.sleep(0); emitter.onNext(1); // skip emitter.onNext(2); // deliver Thread.sleep(505); emitter.onNext(3); // skip Thread.sleep(99); emitter.onNext(4); // skip Thread.sleep(100); emitter.onNext(5); // skip emitter.onNext(6); // deliver Thread.sleep(305); emitter.onNext(7); // deliver Thread.sleep(510); emitter.onComplete(); } }); } 下面的注释应该是ThrottleLast的结果,和ThrottleFirst的不符
The text was updated successfully, but these errors were encountered:
的确,是写反了。应该是emit时间周期内的第一个,作者笔误。
Sorry, something went wrong.
No branches or pull requests
private Observable getObservable() {
return Observable.create(new ObservableOnSubscribe() {
@OverRide
public void subscribe(ObservableEmitter emitter) throws Exception {
// send events with simulated time wait
//下面的注释是作者原注释,我觉得不太对,因为这个运行的结果是1,3,7被发送出来了
Thread.sleep(0);
emitter.onNext(1); // skip
emitter.onNext(2); // deliver
Thread.sleep(505);
emitter.onNext(3); // skip
Thread.sleep(99);
emitter.onNext(4); // skip
Thread.sleep(100);
emitter.onNext(5); // skip
emitter.onNext(6); // deliver
Thread.sleep(305);
emitter.onNext(7); // deliver
Thread.sleep(510);
emitter.onComplete();
}
});
}
下面的注释应该是ThrottleLast的结果,和ThrottleFirst的不符
The text was updated successfully, but these errors were encountered: