Why GIL? (was Re: what's the point of rpython?)

Steve Holden steve at holdenweb.com
Fri Jan 23 07:59:42 EST 2009


Paul Rubin wrote:
> Carl Banks <pavlovevidence at gmail.com> writes:
>> 3. If you are going to use the low-level API on a mutable object, or
>> are going to access the object structure directly, you need to acquire
>> the object's mutex. Macros such as Py_LOCK(), Py_LOCK2(), Py_UNLOCK()
>> would be provided.
> 
> You mean every time you access a list or dictionary or class instance,
> you have to acquire a mutex?  That sounds like a horrible slowdown.

Indeed it would, but hey, let's not let that stop us repeating the
thinking that's gone into CPython over the last fifteen years. "Those
who cannot remember the past are condemned to repeat it".

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list