Do we really need const?
Jan Claeys
usenet at janc.be
Sat Sep 22 18:19:29 PDT 2007
Op Mon, 17 Sep 2007 23:00:33 -0700
schreef Walter Bright <newshound1 at digitalmars.com>:
> A lot of Python users also seem to be quite unhappy about the gil.
Actually, only some Python implementation have the GIL (CPython &
Stackless), most don't have it (Jython, IronPython, PyPy, etc.).
Of course CPython is probably used more than all others combined...
> Python in its current form appears to be unsuitable for writing
> parallel code.
There are lots of (sometimes massively) parallel python applications
around; some of them were named in the recent discussions. As an
example, the EVE Online servers & clients work as one large distributed
parallel application (there is one shared "state").
The complaints seem to be more about how people have to write parallel
code, but trying to port Java/C++ code/idioms word for word into Python
(obviously) doesn't work very well.
AFAIK most CPython parallel programming uses one of two techniques:
1. Non-Python modules (e.g. those written in C, C++ or D) can
(temporarily) release the GIL if they make sure they don't access/change
data shared with other threads during that period.
2. Multiple processes + some form of IPC (machine-local or distributed
over a cluster)
--
JanC
More information about the Digitalmars-d
mailing list