Earlier you said that "several scripts are running [in] parallel". That's
precisely what's not supported. Sven was pointing out that when several
threads need to access an isolate, they can do so, but only *one at a
time*. No two threads can be allowed to run in the same isolate at the same
time, or very weird things will begin to happen (the observation about the
constant sum of loop counts is just a mildly amusing, harmless example; you
could also have data loss, crashes and whatnot).


On Mon, Apr 8, 2013 at 3:35 PM, Laszlo Szakony <laszlo.szak...@certec.at>wrote:

> That`s what I`m doing. I have one Context in the default isolate - one
> global object - and several threads running JS functions. Each thread uses
> v8::Locker for synchronization.
> Can I call in this case TerminateExecution() for each thread or not? It
> seems to work up to the sleep() problem, where 1 thread remains running.
>
> Am Montag, 8. April 2013 15:17:13 UTC+2 schrieb Sven Panne:
>
>> Just a quick drive-by comment: You *can* use an Isolate from various
>> threads, but you'll have to use a v8::Locker in all threads then. This way,
>> you inform v8 about your thread switches and make sure that at any given
>> point in time at most one thread is actively using an Isolate.
>>
>  --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to