Why should not use EventEmitter for Asynchronous Operations

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 7

  • @_benlesh
    @_benlesh ปีที่แล้ว +6

    🤯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!

  • @famrossignon
    @famrossignon ปีที่แล้ว +2

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

    • @adventuresinnodeland
      @adventuresinnodeland  ปีที่แล้ว +1

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

  • @kid1412621
    @kid1412621 4 หลายเดือนก่อน

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