Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-21 Thread Michael Sparks
On Thursday 20 December 2007 07:55:11 Richard Taylor wrote: > You won't find much on MASCOT unfortunately: > http://en.wikipedia.org/wiki/Modular_Approach_to_Software_Construction_Oper >ation_and_Test This was indeed enough for me to find lots :-) Including: * The Official Handbook of Mascot :

Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-20 Thread Michael Sparks
On Thursday 20 December 2007 07:55:11 Richard Taylor wrote: > That is reasonable. There can be performance improvements from using > separate read/write locks under certain loads, but I doubt that is an issue > here. Indeed. I'm tempted to do value level locking at somepoint, but performance isn

Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-20 Thread Richard Taylor
Mike On Wednesday 19 December 2007, Michael Sparks wrote: > The thing here all of these functions have in common is they are all > read-write on the state (eg creating non-pre-existing vars). So rather than > having separate read & write locks, I've decided on a single lock for > read-write. That

Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-19 Thread Michael Sparks
On Wednesday 12 December 2007 08:43:14 Richard Taylor wrote: > I like to use explicit read locks for shared data structures, mainly > because it makes it much safer when someone comes along and adds > functionality to the methods later on. I've had a think about this - especially with regard to r

Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-12 Thread Richard Taylor
Mike On Tuesday 11 December 2007, Michael Sparks wrote: > Hi Richard, > > > On Tuesday 11 December 2007 13:36, Richard Taylor wrote: > > I don't think that you can rely on the threadsafety of these functions. > > Even if they are threadsafe in C Python (which I doubt that 'set' is), the > > lock

Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-11 Thread Michael Sparks
Hi Richard, On Tuesday 11 December 2007 13:36, Richard Taylor wrote: > I don't think that you can rely on the threadsafety of these functions. > Even if they are threadsafe in C Python (which I doubt that 'set' is), the > locking in Jython in more fine grained and would likely catch you out. It'

Re: [python-uk] [pyconuk] Minimalistic software transactional memory

2007-12-11 Thread Richard Taylor
Mike I don't think that you can rely on the threadsafety of these functions. Even if they are threadsafe in C Python (which I doubt that 'set' is), the locking in Jython in more fine grained and would likely catch you out. I would suggest that you should routinely wrap shared datamodels like th