Ben, that's at least part of the solution.  I have seen a situation where I
am "sure" an event has been emitted and "sure" that a listener is (already)
registered, but the listener never executes.  More precisely, I think I may
have managed to overwhelm the queue for a particular event.  I've done
indirect things and I'm the end just rewrote my code to avoid whatever I
was doing wrong.  But it would be nice to see each event getting enqueued
and dequeued.  And since this amounts to debugging the runtime environment,
the instrumentation cannot rely on node events...I have to step outside and
peek in.  But I misspoke when I said I thought it needed V8
instrumentation.  I think some hooks higher up in node could work but I
don't really know of course.

Maybe I should ask instead what docs there are on the design assumptions or
limits on node event management?
 On Mar 22, 2012 8:58 AM, "Ben Noordhuis" <[email protected]> wrote:

> On Thu, Mar 22, 2012 at 16:08, C. Mundi <[email protected]> wrote:
> > Glad you asked.  I mean the node user-space events that we connect to
> with
> > listeners, like emitted.on('eventname',...).  What I'd like is a tool
> which
> > can snoop by walking the whole queue for 'eventname' without dequeuing
> any
> > events.  The tool would have to be integrated with V8 I think because I
> want
> > to see events added and removed in "realtime"
>
> EventEmitter is synchronous, there is no queue. One end emits an event
> and the other end receives it immediately. It's the observer design
> pattern under a different name, really.
>
> If you only want to retrieve the list of listeners, call
> `.listeners('eventName')`.
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to