How much processing are you doing in a loop?  Usually the time to do normal
processing tasks if fine in one tick.  The classic example of taking to
long is calculating a Fibonacci series.

In any case, here is a loop that runs until cond is true ...

function processOneTick() {
    // do work for one tick
    if (!cond)  setTimeout processOneTick, 0
}
processOneTick()

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