From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1236103870.4929.101.camel@goose.sun.com> References: <138575260903030352s623807d7p5a3075b1f7a591f6@mail.gmail.com> <3e1162e60903030719v141b41e9ma5fd98c73d8b0e7c@mail.gmail.com> <1236103870.4929.101.camel@goose.sun.com> Date: Tue, 3 Mar 2009 21:07:39 -0800 Message-ID: <3e1162e60903032107we6da81dk35574c6f1dd925bc@mail.gmail.com> From: David Leimbach To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd28d76e0e2fa04644407b0 Subject: Re: [9fans] threads vs forks Topicbox-Message-UUID: af435f3a-ead4-11e9-9d60-3106f5b1d025 --000e0cd28d76e0e2fa04644407b0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Mar 3, 2009 at 10:11 AM, Roman V. Shaposhnik wrote: > On Tue, 2009-03-03 at 07:19 -0800, David Leimbach wrote: > > > My knowledge on this subject is about 8 or 9 years old, so check with > your local Python guru.... > > > > > > The last I'd heard about Python's threading is that it was cooperative > > only, and that you couldn't get real parallelism out of it. It serves > > as a means to organize your program in a concurrent manner. > > > > > > In other words no two threads run at the same time in Python, even if > > you're on a multi-core system, due to something they call a "Global > > Interpreter Lock". > > I believe GIL is as present in Python nowadays as ever. On a related > note: does anybody know any sane interpreted languages with a decent > threading model to go along? Stackless python is the only thing that > I'm familiar with in that department. I'm a fan of Erlang. Though I guess it's technically a compiled virtual machine of sorts, even when it's "escript". But I've had an absolutely awesome experience over the last year using it, and so far only wishing it came with the type safety of Haskell :-). I love Haskell's threading model actually, in either the data parallelism or the forkIO interface, it's pretty sane. Typed data channels even between forkIO'd threads. > > > Thanks, > Roman. > > > --000e0cd28d76e0e2fa04644407b0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Mar 3, 2009 at 10:11 AM, Roman V= . Shaposhnik <rvs@sun.c= om> wrote:
On Tue, 2009-03-03 at 07:19 -0800, David Leimbach wrote:<= br>
> My knowledge on this subject is about 8 or 9 years old, so check with = your local Python guru....
>
>
> The last I'd heard about Python's threading is that it was coo= perative
> only, and that you couldn't get real parallelism out of it. =A0It = serves
> as a means to organize your program in a concurrent manner.
>
>
> In other words no two threads run at the same time in Python, even if<= br> > you're on a multi-core system, due to something they call a "= Global
> Interpreter Lock".

I believe GIL is as present in Python nowadays as ever. On a related<= br> note: does anybody know any sane interpreted languages with a decent
threading model to go along? Stackless python is the only thing that
I'm familiar with in that department.

I= 'm a fan of Erlang. =A0Though I guess it's technically a compiled v= irtual machine of sorts, even when it's "escript".

But I've had an absolutely awesome experience over the l= ast year using it, and so far only wishing it came with the type safety of = Haskell :-).

I love Haskell's threading model = actually, in either the data parallelism or the forkIO interface, it's = pretty sane. =A0Typed data channels even between forkIO'd threads.
=A0


Thanks,
Roman.



--000e0cd28d76e0e2fa04644407b0--