Do we really need const?

Daniel Keep daniel.keep.lists at gmail.com
Sat Sep 22 23:16:03 PDT 2007



Jan Claeys wrote:
> Op Mon, 17 Sep 2007 23:00:33 -0700
> schreef Walter Bright <newshound1 at digitalmars.com>:
>> 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").

To be fair, that's parallelism via stackless which is just cooperative
multithreading.  As far as I understand it, if you ignore the overhead
of context switching and locks, code written against stackless and using
Python threads will run at the same speed irrespective of how many
hardware threads you have.  Neither one, AFAIK, can actually execute
multiple threads of Python code simultaneously.

That said, stackless is still the bee's knees if you're on a
uniprocessor machine.  The ability to have hundreds of thousands of
super lightweight threads with almost no overhead, *and* the ability to
just pickle a thread and re-start it on another machine?

And people wonder why the EVE guys get so excited by it :P

	-- Daniel



More information about the Digitalmars-d mailing list