On Tue, Feb 5, 2013 at 8:17 AM, Adam Stallard <[email protected]> wrote:
> I would like a way to detect when there is no outstanding I/O.  An event
> would suffice.  A synchronous check would also be nice, but not as
> important.
>
> The only way I have figured out how to do this is to spawn a child process
> which calls node, and then listen for the exit event, but this is expensive.
>
> Domain and Domain.members are close to a solution, but it only shows the
> status the explicitly added event emitters, and there is no event fired when
> a domain member finishes, only if it errors.
>
> I have seen packages (vows) that override
> events.EventEmitter.prototype.emit.  That would work, but the problem is
> that when more than one module does this they interfere with each other.  I
> think it's a bad choice, and it's already made certain modules incompatible
> with each other.
>
> Any ideas?

There is currently no way to do that.

The concept of a 'preExit' event, one that lets listeners revive the
event loop, has been discussed in the past but that's all.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to