Oh, right.  The stackframe will be cleaned up at the end of every event
loop.  And since events don't interrupt the one and only thread, even a
long-running context of the caller will end up with at most a +1 to the
stack depth.

Thanks.  I will have to fins another excuse to learn about the V8 stack.  I
have some tail-recursive code that I'm looking to port to node.  :)
On Mar 22, 2012 9:34 PM, "mscdex" <[email protected]> wrote:

> On Mar 22, 11:20 pm, "C. Mundi" <[email protected]> wrote:
> > These respawn() functions are recursive and, in particular, tail
> recursive
> > (or could be assuming no sneaky side effects).  So (a) how is the depth
> of
> > the node stack set, and (b) does node support any tail recursion
> > elimination?
>
> The effect of using the code I mentioned on the call stack should be
> minimal to none because they (exec and spawn) are both asynchronous
> function calls.
>
> --
> 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