I believe that JS would first finish the onMessage callback function
then call the setInterval callback function.
Since, JS doesn't guarantee that the functions will run at the
interval just that it will try its best to do so.

--
Gary Katsevman
Computer Science Undergraduate
Northeastern University
gkatsev.com



On Thu, Mar 15, 2012 at 11:36, Bjorn <[email protected]> wrote:
> And the question is; what if SetInterval updates the outputBuffer between
> the two red lines above? (which would cause me to loose one or more updates
> since the variable is cleared after the send). In my C++ servers this is a
> clear racecondition that needs to be protected by any number of means.

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