This video investigates why using EventEmitter with an async function is an anti-pattern. Are you using this pattern? Let me know in the comments.
Пікірлер: 7
@_benlesh11 ай бұрын
🤯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!
@augustin_11 ай бұрын
Oh super vidéo. Thanks Matteo !
@kosson10 ай бұрын
Super! I learned a lot. Thank you!
@famrossignon9 ай бұрын
This could be called "Why should not use Asynchronous Operations inside EventEmitter event handlers"
@adventuresinnodeland7 ай бұрын
Indeed! Things can be even more tricky, new video will come soon!
@kid141262115 күн бұрын
So the event emitter is designed for async purpose, not async usage?