> From a background thread, unless `--optimize_for_size` or 
> `--predictable` is set, in which case they run on the foreground 
> thread. 

I did a bunch of experiments and I can only see the second pass weak handle 
callback called from the message pump loop. I didn't specify those options 
explicitly (assuming they would be in args.gn) and don't know if they would 
be on by default. Will look more into this. Good to know this bit. I will 
look more into these build options. 

> The foreground thread.  If the script never yields control, you can't 
> pump the message loop. 

Did some more testing and it seems that v8 platform is thread-safe and the 
message pump may be called from different threads for their individual 
isolates, which makes it possible to pump for messages in long-running 
native calls, like waiting for database results. Makes the code more 
complex, though - much easier to deal with the pump when JS code is written 
as a series of callbacks. 

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to