If you need to break something off as to not interfere for w/e reason, look
at `process.nextTick`, if you need to chain together a reaction to an event
from async functions look at `async` from https://github.com/caolan/async
or `understudy` from https://github.com/bmeck/understudy depending on
Hi Issac,
Thanks for the explanation.
It really makes a lot of sense when events are used in a more "interactive"
way allowing an listener to modify the target. There was a case however for
events when they are used just as a notification pump, to warn that
something happened but without being ab
If you think about how events are used, it's really important that
emit() is synchronous.
If I do `foo.on('bar', myFunction)`, then I want myFunction to be
called *right when 'bar' happens*, not some time *after* 'bar' has
happened.
This is especially important when you think about a http request
Thanks!
2013/1/11 Dan Milon
> danmilon
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to n
sync.
https://github.com/joyent/node/blob/master/lib/events.js#L123
danmilon
On 01/11/2013 06:21 PM, Eric wrote:
> Hi guys,
>
> Newbie question here: when a code calls emitter.emit(event), does the
> listeners get executed synchronously or asynchrounsly?
>
> Thanks for the help,
>
> Eric.
>
>
Hi guys,
Newbie question here: when a code calls emitter.emit(event), does the
listeners get executed synchronously or asynchrounsly?
Thanks for the help,
Eric.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You r