Global Locking

Daniel Parks Dan.Parks at
Mon Aug 5 15:37:34 CEST 2002

I know that python has made the design decision to use a Global lock to
control threading (GIL).  However, I am developing a system in which
throughput is much less important than switching speed among threads.
Has anyone thought of modifying python to this extent?  I understand why
the design decision for one big lock was made, however, for my specific
needs it simply is not the right decision.  Therefore, I am thinking
about altering python to have a series of finer grained locks. Has
anyone already done this?  Has anyone ever tried to do this?  Does
anyone have any suggestions on implementation?  I was trying to figure
out what would be a good design as far as locks on reference counts
would way would have each thread have a set of their own
reference well as individual locks for global
references.....  I know this is not a small endeavour, so I wanted to
get feedback from python developers on it, before I jumped in head


Dan Parks

More information about the Python-list mailing list