Global Locking

Daniel Parks Dan.Parks at CAMotion.com
Mon Aug 5 09:37:34 EDT 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 be.....one way would have each thread have a set of their own
reference counts....as 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
first.

TIA,

Dan Parks







More information about the Python-list mailing list