Parallelization on muli-CPU hardware?

Paul Rubin http
Fri Oct 8 02:16:36 EDT 2004


Bryan Olson <fakeaddress at nowhere.org> writes:
> So what's the solution?  A global-interpreter-lock works; that's
> what Python has now; but we lose much of the power of multi-
> processing systems.   We could give every object its own lock,
> but the locking overhead would defeat the purpose (and inter-
> object conditions can be trickier than they might look).

Giving every object its own lock is basically what Java does.  Is it
really so bad, if done right?  Acquiring or releasing the lock can be
just one CPU instruction on most reasonable processors.  I've been
wondering about this for a while.



More information about the Python-list mailing list