Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Add explicit v8 locker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
laverdet authored and bnoordhuis committed Feb 4, 2012
1 parent f64989e commit 11d1eca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node.cc
Expand Up @@ -2633,6 +2633,7 @@ int Start(int argc, char *argv[]) {
argv = Init(argc, argv);

v8::V8::Initialize();
v8::Locker locker;
v8::HandleScope handle_scope;

// Create the one and only Context.
Expand Down

0 comments on commit 11d1eca

Please sign in to comment.