Ask questionsHaving two `interval` streams running at the same time sometimes causes them to freeze/halt
I have two streams created with interval
operator:
When they run at the same time, sometimes they "freeze" or "halt" and do not emit for some time. It happens randomly, I didn't find one rule by which it occurs.
The streams created with interval
operator should emit according to the time that was set at the beginning.
No response
https://stackblitz.com/edit/stackblitz-starters-6jltsf?file=src%2Fmain.ts
7.8.1
No response
The code in Stackblitz measures time between each emission for two streams: main and secondary. Then compares this time to the one set in interval
operator. If the time measured is 1.5x (or more) times greater than original one then report error to the console.
Below you can see two screenshots that I took. They show that it occurs randomly (sometimes there are no errors):
Here you can see that it took 127 emissions for secondary stream to exceed its original interval time (3 seconds) by around 16s and 35s seconds.
Here it happened quite quickly and for both main and secondary.
Related questions
No questions were found.