[Python-ideas] Optimistic Concurrency

skip at pobox.com skip at pobox.com
Mon Oct 20 04:05:45 CEST 2008

    Leif> I see that now, but wasn't the original post about removing the
    Leif> GIL?  That seems to imply that the users would be different
    Leif> threads in a program, with high speed and possibly high collision
    Leif> rate.

Yes, it was.  (I'm the OP.)

I'm curious about the assertion of "possibly high collision rate".  Do you
have measurements to support that?  If the collision rate is high enough
you'd be replaying operations all the time.  OTOH, if the actual collision
rate is quite low the replay operation, even if it is onerous, can be
tolerated.  Someone else mentioned the problem with side effects in
non-functional languages.  That would indeed seem to be a problem with C
(the level I see this operating at.)  I have no desire to add further load
to the Python programmer.  Programming with multiple threads is already hard

Clearly the GIL is too coarse a level of locking because it eliminates all
possible parallelism.  Is it possible that some finer grained locking (but
still coarser than complete free threading) can give you back some of the
possible parallelism?  Maybe reqire all mutable types to support a GIL of
their own?


More information about the Python-ideas mailing list