Introduction to Schedulers in Rx Programming

Learn the importance of Schedulers in RxJS.

As soon as I discovered RxJS, I started using it in my projects. For a while, I thought I knew how to use it effectively, but there was always a nagging question: How do I know whether the operator I’m using is synchronous or asynchronous? In other words, when exactly do operators emit notifications? This seemed like a crucial part of using RxJS correctly, but it felt a bit blurry to me.

The interval operator, I thought, is clearly asynchronous, so it must use something like setTimeout internally to emit items. But what if I’m using the range operator? Does it emit asynchronously as well? Does it block the event loop? What about the from operator? I was using these operators everywhere, but I didn’t know much about their internal concurrency model.

Get hands-on with 1200+ tech skills courses.