Why should not use EventEmitter for Asynchronous Operations

Поделиться
HTML-код
  • Опубликовано: 19 окт 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 3 месяца назад

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

  • @famrossignon
    @famrossignon Год назад +1

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

    • @adventuresinnodeland
      @adventuresinnodeland  10 месяцев назад

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