2009/6/3 Ned <[email protected]>: > > Thank you Sébastien for your reply, > I would guess how to implement the event thread but how do I interrupt > the execution of the script thread so I could force the execution of a > particular script code. That's what I don't know. Could you or someone > else please provide some details about it?
The way it works in a browser is there is only one thread. The scripts are never interrupted, but are expected to return to the event loop after a reasonably short time, possibly scheduling another callback first. > > Thank you > Nedko > > On Jun 2, 10:18 pm, Sébastien Pierre <[email protected]> > wrote: >> You'd probably have to add an event loop and have a timer thread insert >> callbacks into the loop. You could use things like libevent to do that. >> >> -- Sébastien >> >> >> >> On Tue, Jun 2, 2009 at 11:23 AM, Ned <[email protected]> wrote: >> >> > Thank you Dean... and yet some directions on how to implement it? >> >> > On Jun 2, 6:16 pm, Dean McNamee <[email protected]> wrote: >> > > These concepts are driven around the concept of a main event loop. >> > > This concept is specific to browsers, and not to JavaScript. It would >> > > all depend how you embed the JavaScript engine, and if you want to >> > > structure it around an event loop with timers, etc. >> >> > > -- dean >> >> > > On Tue, Jun 2, 2009 at 5:11 PM, Ned<[email protected]> wrote: >> >> > > > As long as I can see there is no setInterval & setTimeout functions in >> > > > V8 because they are bound to "window" object in KHTML... >> >> > > > My question is - have some of you guys written or does someone know is >> > > > there a code that could add such a behavior to V8. I really need this >> > > > behavior. >> >> > > > Regards >> > > > Nedko >> >> > > > ps I honestly can't imagine real javascript without setInterval & >> > > > setTimeout > > > -- Erik Corry, Software Engineer Google Denmark ApS. CVR nr. 28 86 69 84 c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018 Copenhagen K, Denmark. --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
