Question about Python threads

Ville Vainio vvainio at
Mon Aug 26 15:32:36 CEST 2002

Gerhard Häring <gerhard.haering at> wrote in message news:<slrnamfi77.1lo.gerhard.haering at>...

> In Python, everything is an object, including ints, ... so two threads
> manipulating the refcount of an object at the same time will certainly
> crash the interpreter sooner or later. AFAIK Java objects don't have
> refcounts, right?

Yes, Java uses garbage collection. On a related note: could GIL be
dumped if refcounts were no longer used (ie Python changed over to gc
instead)? I know there are many other things that depend on GIL, but
how much of it would be impossible/hard to fix/bad for performace?

-- Ville

More information about the Python-list mailing list