Re: threads and sleep?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: threads and sleep?

From: Andreas Kostyrka <andreas@kostyrka.org>
Date: Wed Jul 13 2005 - 12:04:45 CEST

Am Mittwoch, den 06.07.2005, 12:27 -0700 schrieb Jonathan Ellis:

> Your sarcasm is cute, I suppose, but think about it for a minute. If
> the opposite of what I assert is true, why would even the mainstream
> press be running articles along the lines of "multicore CPUs mean
> programming will get tougher because locking is hard to get right and

Easy ;)

They run these articles, because

-) they have copied it from the press releases.

-) it's partly true.

-) it's the current hype in processors.

That doesn't change the contrary facts:

-) the general threading programming model is very hard to get right.
It's basically at the moment where we were with memory management at C
level. Painful, and errorprone. Nothing to be happy about.

-) There is a spectrum of problems from "requires to be run in sequence"
to can be run on as many "work slaves via the internet". Fact is that
Python is bad at a certain slice (can benefit from tightly
interoperating threads). And that will not change that quickly, because
there are certain problems. But Python works quite well for the
neighboring segments, and it got a number of solutions for a number of
problems in this segment. (Be it Twisted, forking, threads + GIL, etc.)

Andreas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBC1Oc9HJdudm4KnO0RAimgAKC4Ajg8z0648bSrTZCHojKv7tRCKQCdHGj8
a0JEbF57Ftwj4oOPcPHti2A=
=en2+
-----END PGP SIGNATURE-----

[plaintext signature.asc.1121249085.197006375]
Received on Thu Sep 29 16:55:27 2005