[Python-Dev] GIL, Python 3, and MP vs. UP

Florian Weimer fw at deneb.enyo.de
Mon Sep 19 22:29:06 CEST 2005

* Guido van Rossum:

> That assumes a very specific model for how all that MP power is going
> to be used.


> I personally don't think the threaded programming model as found in
> Java works all that well; without locks you end up with concurrent
> modification errors, with locks you get deadlocks and livelocks.

Java is bascially forced into that model because VM startup costs are
so high.  To some extent, Python has similar problems, but you don't
have to care about preserving class loader semantics, so you should be
in a better position to cut down process creation time.

> Be my guest. Prove me wrong. Talk is cheap; instead of arguing my
> points (all of which can be argued ad infinitum), come back when
> you've got a working GIL-free Python. Doesn't have to be CPython-based
> -- C# would be fine too.

By the way, has anybody ever tried to create a CPython variant which
uses a (mostly) copying garbage collector (or something else except
reference counting or Boehm GC)?

Copying GC might help to get rid of the GIL *and* improve performance
in the accept+fork model (because read-only object access does not
trigger copy-on-write anymore).

More information about the Python-Dev mailing list