Тёмный

Why should not use EventEmitter for Asynchronous Operations 

Adventures in Nodeland - Matteo Collina
Подписаться 3,9 тыс.
Просмотров 4,3 тыс.
50% 1

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.

Опубликовано:

 

12 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@_benlesh
@_benlesh Год назад
🤯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_ Год назад
Oh super vidéo. Thanks Matteo !
@kosson
@kosson Год назад
Super! I learned a lot. Thank you!
@kid1412621
@kid1412621 Месяц назад
So the event emitter is designed for async purpose, not async usage?
@famrossignon
@famrossignon 10 месяцев назад
This could be called "Why should not use Asynchronous Operations inside EventEmitter event handlers"
@adventuresinnodeland
@adventuresinnodeland 9 месяцев назад
Indeed! Things can be even more tricky, new video will come soon!
Далее
Generating Types without Climbing a Tree
20:08
Просмотров 1,4 тыс.
NODE_ENV=production is a lie
18:48
Просмотров 4,2 тыс.
НЕВОЗМОЖНЫЙ ЭКСПЕРИМЕНТ
00:39
Просмотров 74 тыс.
Node.js is a serious thing now… (2023)
8:18
Просмотров 645 тыс.
Do not thrash the Node js event loop
24:52
Просмотров 4,7 тыс.
The Node.js Event Loop: Not So Single Threaded
31:54
Просмотров 166 тыс.
How to make your Node.js API 5x faster!
16:39
Просмотров 10 тыс.
Cursor Is Beating VS Code (...by forking it)
18:00
Просмотров 93 тыс.
So You Think You Know Git - FOSDEM 2024
47:00
Просмотров 1,1 млн
How I combined node:test with TypeScript!
32:06
Просмотров 1,7 тыс.