Question about Python threads

Greg Ewing see_reply_address at something.invalid
Tue Aug 27 04:53:16 CEST 2002


Ville Vainio wrote:

> 
> 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)?


Refcounts are by no means the only reason Python has
a GIL. Even without refcounting, lack of a GIL would
require locks around many other things, e.g. anything
which mutates an object (inserting/deleting list
items, etc.) Also object allocation, which I suspect
Python does a lot more of than Java, since Java has
unboxed ints/floats/etc.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list