[Python-Dev] Fwd: Removal of GIL through refcounting removal.
Oleg Broytmann
phd at phd.pp.ru
Fri Oct 31 13:35:00 CET 2008
On Fri, Oct 31, 2008 at 07:59:01AM -0400, Calvin Spealman wrote:
> Has anyone made the argument for keeping the GIL to discourage
> threading?
I haven't, but I would support such argument. In my humble opinion
multithreading is rarely a good answer, and for multicore CPUs it's a wrong
answer. For multicore CPUs the answer is multiprocessing + IPC (or a good
database; filesystem is not a good database because it requires locking).
One big problem with multithreading - it violates "divide et conqueror"
principle. In programming almost everything is about separation of access
rights - namespaces, modules, etc. Multithreading model allows a number of
processes to share memory.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev
mailing list