v8 is thread-safe, but only one thread may access the v8 runtime at a once.
You must unlock from one thread and lock with another thread before you can
use it another thread. Even if you are using multiple separated contexts
it's impossible to get any kind of parallelism in v8 in one process.

More information on the complications were discussed here:
http://groups.google.com/group/v8-users/browse_thread/thread/44621a6efef0104f

If most of your work will take place outside the VM (through native C++
extensions) then perhaps running JS with no parallelism will be ok, because
you can make your API calls asynchronous and parallel.. but the actual JS
will be 1 thread.

Otherwise you will need more than one process.

On Sat, Apr 2, 2011 at 2:52 PM, lama12...@googlemail.com <
lama12...@googlemail.com> wrote:

> Hey v8-people!
>
> Are the JS-side threads already finished? I WANT them. :D
>
> Lua is ugly+just coroutines, python is ugly+overblown, and and and...
> i just wanna use v8 for a game. You cant program a gametype without
> threads...
>
> Regards,
> lama12345
>
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users

Reply via email to