David Bolen db3l at
Fri Nov 16 01:03:30 CET 2001

Thomas Jensen <thomasNO at> writes:

> Thank you for the detailed explanation, I guess the reason I asked was 
> that I didn't quite know how the GIL worked.
> I thought that perhaps the for loop would lock the specific list for 
> modification. The more I think about it, the more unreasonable it 
> seems. Especially since the lock is global, it would not only block 
> access to the list.
> I'll keep up the paranoia :-)

You might also want to do some google searching since there have been
some discussions recently that cover this in more detail.  In
particular, the "Critical sections and mutexes" thread, which
discusses this and includes some opposing viewpoints in terms of being
able to be more trusting of the thread-safety of the interpreter.

I think this URL will get you to the thread (not sure if it can be
simplified) - it's all one line:

Worse case searching for the subject should do it.  Looking for GIL or
global interpreter lock will probably turn up other references as

-- David
 \               David Bolen            \   E-mail: db3l at  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \

More information about the Python-list mailing list