On Mon, Jul 2, 2012 at 3:11 PM, Michael Schwartz <[email protected]> wrote:
> However, a long running thread could call sleep(0) or pthread_yield()
> periodically to allow the other threads to run.
>
>From what i understand, every time the JS-side code calls back into v8
(e.g. via a function call), v8 gets a chance to interrupt it. This doesn't
protect against infinite loops which don't call back into v8, of course.
while(true){++i} would "probably" never yield.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users