i'm currently deciding if i'm going to switch from spidermonkey to V8.
i really would like to use V8, but if it's not going to be threadsafe
within a year or so there is absolutely no way that i can use it, and
that's a shame :(
i simply cannot use it, i don't want users to have to wait for the
execution of a slow function to complete before the application
becomes responsive again.
--
--
Let's turn the question around. How in the world does SpiderMonkey support multi-threading? How is it specified? Did they invent a memory-model for JS?
JS_THREADSAFE is a compile-time option that enables support for running multiple threads of JavaScript code concurrently as long as no objects or strings are shared between them.
We have recently made major changes to this feature. Until recently, sharing objects among threads would mostly work, although scripts could easily make it crash. We have now completely removed that feature. Each thread that uses the JavaScript engine must essentially operate in a totally separate region of memory.
https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSRuntime
Only one thread may use a JSContext at a time.
--