🤯TIL that EventEmitter is fundamentally broken, actually, by what is called "producer interference". It basically breaks the loop that is notifying consumers when any one of those consumers synchronously errors. This is something we fixed about Observable (and Subject) years ago because of debate in the TC39 about behavior. We shouldn't be able to `try/catch` over an `emit`. That's bad.... Amazing video, Matteo, thanks!
🤯TIL that EventEmitter is fundamentally broken, actually, by what is called "producer interference". It basically breaks the loop that is notifying consumers when any one of those consumers synchronously errors. This is something we fixed about Observable (and Subject) years ago because of debate in the TC39 about behavior. We shouldn't be able to `try/catch` over an `emit`. That's bad....
Amazing video, Matteo, thanks!
Oh super vidéo. Thanks Matteo !
Super! I learned a lot. Thank you!
This could be called "Why should not use Asynchronous Operations inside EventEmitter event handlers"
Indeed! Things can be even more tricky, new video will come soon!
So the event emitter is designed for async purpose, not async usage?