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)
Am 20.03.2014 um 11:04 schrieb Sven Panne <[email protected]>:
> Your problem is that there is no "current" Isolate in the newly created
> thread, as you can see from the isolate=0x0000000000000000 lines in the
> backtrace. The "current Isolate" is thread-local state, and a big PITA,
> especially when combined with the default Isolate, as in your example. I
> don't know about node's API, but you should somehow make the Isolate you want
> to use explicit.
>
> --
--
--
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.