2009/12/4 Matthias Ernst <[email protected]>: > On Fri, Dec 4, 2009 at 8:37 PM, Erik Corry <[email protected]> wrote: >> 2009/12/4 Tom Brown <[email protected]>: >>> I have embedded V8 into a server application as a request processing >>> mechanism. Only one request is ever touching the V8 engine at any >>> given time, so I'm not concerned with multi-threading. However, each >> >> If you are using V8 from more than one thread then you have to use the >> Locker objects from v8.h. It is not enough that you only use it from >> one thread at a time, you also have to use Lockers in order to tell V8 >> which thread you are in. > > I don't think this is not in line with what v8.h documents: > > http://v8.googlecode.com/svn/trunk/include/v8.h: > * Multiple threads in V8 are allowed, but only one thread at a time > * is allowed to use V8. The definition of 'using V8' includes > * accessing handles or holding onto object pointers obtained from V8 > * handles. It is up to the user of V8 to ensure (perhaps with > * locking) that this constraint is not violated. > * > * If you wish to start using V8 in a thread you can do this by constructing > * a v8::Locker object. ... > > This very much suggest you can use any mechanism you like, and be it > "just knowing" and that v8::Locker is just one convenient one.
Yes, that's very misleading. I have filed a bug to remind myself to fix it. -- Erik Corry -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
