I think I found some idea... Well, some way of solving the problem of
v8 one-at-a-time model...

To be short:

Handle<Value> yield(const Arguments& args)
{
   v8::Unlocker unlocker;
   Sleep(5); // for example
// or even Sleep(0) just to give away control of v8 mutex
}


So suppose I have a long-running script.
And it calls this function from time to time inside the depth of its
loop.
Or maybe every iteration if speed if not an issue for this long-
running in background thread.
Than other scripts in different threads can still run? Am I right?




--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to