Future of Pypy?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Tue Feb 24 01:57:19 EST 2015
Paul Rubin wrote:
>> With threads in a single process, this isn't a problem. They all
>> access the same memory space, so they can all share state. As soon as
>> you go to separate processes, these considerations become serious.
>
> Right, that's a limitation of processes compared to threads.
>
I think the point is that it's not a *limitation* of processes, but a
*feature* of processes that they don't share state. (Well, I think there are
explicit ways to have shared memory, but that's another story.)
An interesting point of view: threading is harmful because it removes
determinism from your program.
http://radar.oreilly.com/2007/01/threads-considered-harmful.html
As I once wrote:
A programmer had a problem, and thought Now he has "I know, I'll solve
two it with threads!" problems.
http://code.activestate.com/lists/python-list/634273/
Some discussion of the pros and cons of threading:
http://c2.com/cgi/wiki?ThreadsConsideredHarmful
--
Steven
More information about the Python-list
mailing list