On Thu, Mar 22, 2012 at 18:52, C. Mundi <[email protected]> wrote: > 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?
There's not much to Node's EventEmitter implementation, [1] is all it is. The code is optimized a great deal and quite ugly but it's conceptually very simple. It sounds like you're running into the maxListeners limit (default=10). It's a safeguard to prevent resource leaks (to stop people from inadvertently adding listeners again and again) but its behavior might surprise you if you miss the warning it prints. [1] https://github.com/joyent/node/blob/v0.6/lib/events.js -- 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
