On Mon, Sep 14, 2009 at 4:40 PM, Erik Corry <[email protected]> wrote:
> In a browser the way it works is that your JS code is called in > response to some event. That can be a timeout, registered earlier or > it can be an event (onMouseDown, onPageLoaded, I don't remember the > exact names). You relinquish control by returning from the callback. > That's pretty explicit. It's a fairly lame programming model, but it > has the advantage that you don't have to think about concurrency. > Other JS code can only run when you let it by returning at the top > level you were called. > Thanks very much for that clarification :). i'll take a look to see how i can implement it without the second thread, but i'm not at all clear how i can do that without using a timer thread. In any case, i was tickled pink to see that it was indeed possible to get access to v8 via multiple threads without much hackery involved. i've tried to put the MT setTimeout code through the ringer, and so far it all works as i'd like it to. However, given the different semantics vis-a-vis browsers, i should really rename it. :) -- ----- stephan beal http://wanderinghorse.net/home/stephan/ --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
