nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.44k stars 276 forks source link

why use the event emitter instead of the asynchronous function #4342

Closed Sivaharish12 closed 2 weeks ago

Sivaharish12 commented 4 months ago

Why the event emitter is used instead of the asynchronous function because the asynchronous function is also capable of doing the emitter so why do we use the event emitter.

preveen-stack commented 4 months ago

https://stackoverflow.com/questions/27677692/performance-cost-of-pubsub-excessive-events-and-event-handlers-in-javascript

Perhaps the above can shed some light

RedYetiDev commented 3 weeks ago

@Sivaharish12 did @preveen-stack's solution help?