Peep the Locker documentation. You only need a Locker if you're using Lockers in the first place.. And you can't have an Unlocker without first having a Locker (that's what your failed assert is).
Basically there's a special case so that if you're using v8 in a single thread, that thread is always considered "locked". But if you ever need to invoke v8 from a different thread you must lock and unlock. But if you're using Isolates that would imply you need more than one thread, because there's nothing that Isolate get you that Context doesn't.. beside multi-thread support. On Fri, Jun 24, 2011 at 12:44 AM, Stephan Beal <[email protected]>wrote: > Hi, gurus, > > The API docs for Isolates say: > > > When V8 <http://classv8_1_1V8.html> is initialized a default isolate is > implicitly created and entered. > > And the Enter() docs say: > > > Methods below this point require holding a lock (using > > Locker<http://classv8_1_1Locker.html>) > in a multi-threaded environment. > > > The implication of that is that the default isolate must be using a Locker > (or else it couldn't/shouldn't have been Entered, right?). > > That does not, however, jive with what i'm seeing. i removed my app's > top-level Locker instance based on the above wording, but i'm then getting: > > CHECK(isolate_->thread_manager()->IsLockedByCurrentThread()) > > when i use Unlocker(). > > No big deal - i just read-add my top-level Locker. But it's not consistent > with my interpretation of the API docs. > > -- > ----- stephan beal > http://wanderinghorse.net/home/stephan/ > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
