You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the above code does not work anymore after we upgrade to RxJS@7, it likes that all delay does not take effect anymore: all items will be emitted without any delay.
Problem: breaking changes from RxJS
After performed my google-fu, I found there's a "behavior of delay inconsistent with completions" (ReactiveX/rxjs#4249) created by @benlesh which talked about this behavior and there's also a PR named "fix(delay): emit complete notification as soon as possible" (ReactiveX/rxjs#4444) has implemented this change.
So that's the reason why our code break after upgrade to RxJS v7.
Solution
Use the following code to emit complete after the delay this.period.
The following code work as expected with RxJS@6:
rx-queue/src/delay-queue.ts
Lines 35 to 38 in 79f8ebb
It will add a delay between each item.
However, the above code does not work anymore after we upgrade to RxJS@7, it likes that all
delay
does not take effect anymore: all items will be emitted without any delay.Problem: breaking changes from RxJS
After performed my google-fu, I found there's a "behavior of delay inconsistent with completions" (ReactiveX/rxjs#4249) created by @benlesh which talked about this behavior and there's also a PR named "fix(delay): emit complete notification as soon as possible" (ReactiveX/rxjs#4444) has implemented this change.
So that's the reason why our code break after upgrade to RxJS v7.
Solution
Use the following code to emit
complete
after the delaythis.period
.The text was updated successfully, but these errors were encountered: