Browse Source

Add explicit v8 locker

v8 requires a lock of each thread using the vm, but if none is
explicitly is created it will implicitly create one for you. This
creates issues when trying to build modules which use v8's
multi-threading features because there's no lock to unlock.
v0.7.4-release
Marcel Laverdet 14 years ago
committed by Ben Noordhuis
parent
commit
11d1eca9f3
  1. 1
      src/node.cc

1
src/node.cc

@ -2633,6 +2633,7 @@ int Start(int argc, char *argv[]) {
argv = Init(argc, argv); argv = Init(argc, argv);
v8::V8::Initialize(); v8::V8::Initialize();
v8::Locker locker;
v8::HandleScope handle_scope; v8::HandleScope handle_scope;
// Create the one and only Context. // Create the one and only Context.

Loading…
Cancel
Save