On Fri, Mar 28, 2014 at 2:46 AM, Jane Chen <[email protected]> wrote:

> With a model where I always have one isolate per thread, and a thread may
> serve multiple requests and live around for some time, is there any reason
> why I want to Enter the isolate every time I make v8 calls and Exit
> afterwards?  Is there any disadvantage to always be in an Isolate even when
> not making v8 calls?
>

Entering an Isolate just does some TLS magic behind the scenes, so that the
current thread remembers the Isolate, i.e. it sets the "current Isolate" in
v8-speak. So in your scenario there is no need to constantly Enter/Exit an
Isolate.

You can think about it another way: By "entering" an Isolate, we implicitly
pass that Isolate as an additional parameter to some API entries which
don't have an Isolate* parameter. We are in the (slow) process of removing
this confusing magic. (Well, this kind of dynamic binding is probably not
so confusing for people doing CS for a looong time or Emacs Lisp hackers...
:-D )

-- 
-- 
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.

Reply via email to