[webkit-help] Javascript instances and threads

Stephen Clibbery sdclibbery at googlemail.com
Tue Sep 15 08:11:27 PDT 2009


I need to embed a javascript engine in a 3D application (so no need
for an HTML DOM etc, just the javascript engine), and I want to get
advice on whether JavaScriptCore (or V8) can do what I need.

I need to have multiple, separate, javascript 'instances'. I also have
multiple threads. I will need to be able to access one javascript
instance from several threads, but I don't mind if they block each
other to do this. However I also need to access two different
javascript instances from two different threads at the same time, and
without them blocking each other.

In other words, I need a javascript engine that doesn't have a Global
Lock for the entire engine, but may have one for each javascript
'instance' or 'context' or 'environment' (not sure on the
terminology). The info I can find online suggests that this can't be
done with V8 (the entire V8 engine must be locked), but can be done
with JSC (because JSGlobalContext's are independent of each other). Is
this correct?

Best Regards and Thanks,

More information about the webkit-help mailing list