On Thu, Mar 20, 2014 at 11:24 AM, Kevin Ingwersen <[email protected]> wrote: > So, do I need to create the isolate before spawning the new thread, and make > node access that? > > Node just really creates a pretty basic isolate. > > static Isolate* node_isolate = NULL; > // snip > > // in: int Start(...) > V8::Initialize(); > { > Locker locker(node_isolate); > Environment* env = > CreateEnvironment(node_isolate, argc, argv, exec_argc, exec_argv); > // snip > > // in: CreateEnvironment(...) > HandleScope handle_scope(isolate); > > Local<Context> context = Context::New(isolate); > Context::Scope context_scope(context); > // cut. > > So, appearently it must be using the default isolate. This is the only code > that seems to initialize or even use the isolate. Well okay, its used far > more often, but that is at the very beginning, and part of the startup code. > What do I need to change to make it thread-conform? x)
If I understand you correctly, you cannot do that. Node.js is currently built around the concept of a single isolate and besides that, it's very much thread-unsafe. If you want to create an isolate that doesn't use anything from node.js, that's another story. Google for 'threads a go go' (often abbreviated to TAGG), it's an add-on that does exactly that. -- -- v8-users mailing list [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
