Subj : Re: Threading in JavaScript To : comp.lang.javascript,netscape.public.mozilla.jseng From : Gordan Date : Sun Feb 02 2003 11:37 pm Steve van Dongen wrote: [snip] > I your code, your setTimeout is really not doing anything. Your first > for loop runs, burning up all the available processor time, and > afterwards your other for loop runs. > > The idea is to have your Thread1 and Thread2 functions do only a > little bit of real work, then use setTimeout to run them again a > little later. I changed Thread1 to do 1 iteration of the "loop" per > function call and Thread2 to do 10 iterations per function call. [snip] Right, I get it. So I cannot really have separate threads running simultaneously. I just get each "thread" to schedule itself in the future, iteration by iteration. OK, I can see how that works. Not quite proper "threading", though. :-( Thanks, anyway. It's a useful method for "pretending" that there are several things running at the same time. ;-) Regards. Gordan .