Why should not use EventEmitter for Asynchronous Operations

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 7

  • @_benlesh
    @_benlesh Рік тому +5

    🤯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_
    @augustin_ Рік тому +2

    Oh super vidéo. Thanks Matteo !

  • @kosson
    @kosson Рік тому +1

    Super! I learned a lot. Thank you!

  • @kid1412621
    @kid1412621 Місяць тому

    So the event emitter is designed for async purpose, not async usage?

  • @famrossignon
    @famrossignon 10 місяців тому +1

    This could be called "Why should not use Asynchronous Operations inside EventEmitter event handlers"

    • @adventuresinnodeland
      @adventuresinnodeland  8 місяців тому

      Indeed! Things can be even more tricky, new video will come soon!