[Python-ideas] Optimistic Concurrency

Leif Walsh leif.walsh at gmail.com
Sun Oct 19 07:36:50 CEST 2008


On Sat, Oct 18, 2008 at 6:23 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> When I said 'impractical', I was thinking about this sort of situation.
> 'Optimistic Concurrency' is optimistic about not colliding ;-).
> Else the recovery overhead makes it worse than locking.

I see now.

>> If we are talking about users communicating over http, this seems like
>> something you'd write a program in python to do (like wikipedia says
>> Rails does), and it doesn't seem to merit discussion in the
>> development of python itself.
>
> Servers have several threads, each communicating with and representing to
> the rest of the system one user.  When those several threads all edit shared
> data, should they have to acquire GIL, local locks, or none at all?  The
> point of the article is that 'no lock' is desirable when many locks would be
> left to expire unused and often also possible.

I'm still not convinced that this should be an implementation concern,
rather than a language concern, but that's probably okay.

-- 
Cheers,
Leif



More information about the Python-ideas mailing list