Minimalistic Software Transactional Memory
Duncan Booth
duncan.booth at invalid.invalid
Sun Dec 9 09:19:39 EST 2007
Michael Sparks <ms at cerenity.org> wrote:
> I'm interested in writing a simple, minimalistic, non persistent (at
> this stage) software transactional memory (STM) module. The idea being
> it should be possible to write such a beast in a way that can be made
> threadsafe fair easily.
>
> For those who don't know, STM is a really fancy way of saying
> variables with version control (as far as I can tell :-) designed to
> enable threadsafe shared data.
>
> I'm starting with the caveat here that the following code is almost
> certainly not threadsafe (not put any real thought into that as yet),
> and I'm interested in any feedback on the following:
>
> * Does the API look simple enough?
> * Are there any glaring mistakes in the code ? (It's always harder
> to see
> your own bugs)
> * What key areas appear least threadsafe, and any general
> suggestions
> around that.
>
> If I get no feedback I hope this is of interest. Since these things
> get archived, if you're reading this a month, 6 months, a year or more
> from now, I'll still be interested in feedback...
Unless you really are desperate to reinvent the wheel, have you looked at
ZODB? https://launchpad.net/zodb
ZODB gives you the transactional model you want. It also gives you
persistence, but if you don't want that you can simply connect to a non-
persistent store.
More information about the Python-list
mailing list