Andrew Kuchling <akuchlin / mems-exchange.org> wrote:
>
>"Alex Maranda" <alex_maranda / telus.net> writes:
> > 1) "green" threads [Ruby as of today]
> > 2) system threads, with a non-reentrant interpreter [Python, global
> > interpreter lock]
> > 3) system threads, fully reentrant interpreter [no example comes to 
>mind]
> >
> > The reason Python stopped at 2) is because 3) is hard. The reason Ruby
> > stopped at 1) is because ...LOL.
> >
> > The issue with 2) is that one cannot take advantage of multiprocessor
> > machines, but it will solve your blocking problem with minimal effort. I
>
>Practically, I'm not sure implementing 3) buys you much.  Threads are
>often used for two purposes:
>
>         1) When writing a network server[...]
>
>         2) You're doing heavy computing and want to use multiple CPUs.
>         [...]
>
>Since full threading is complicated and causes increased overhead even
>for single-threaded programs, it doesn't seem to be worth the trouble;
>the two most common applications for threading don't really benefit
>from it.

I suspect that the most common appliation for threading is
to allow a GUI to be responsive even when the program is
busy doing something else.

In this case increased overhead is not really an issue,
and this application definitely benefits from having real
threading.  Considering that GUI wrappers are a common
use for scripting languages, I would not underestimate the
importance of this case.

Cheers,
Ben
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com