[Javascript] Javascript and threads

twlewis at SoftHome.net twlewis at SoftHome.net
Mon May 28 11:54:24 CDT 2007


Thanks David, you have given me some key terms to research.


> On 28/05/07, twlewis at softhome.net <twlewis at softhome.net> wrote:
>> Can threads be implemented in Javascript (such as nsIThread)?
>
> That depends a little bit on what you mean by a "thread". If you mean
> OS level threads, for utilising maximum CPU, then no. If you mean
> concurrency through cooperative threading of a program running in a
> single OS thread, then yes. There are a number of different solutions
> to cooperative threading, most utilising a task queue and some form of
> trampoline using either exceptions, timers or an indefinite loop.
> --
> David "liorean" Andersson
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>





More information about the Javascript mailing list