I can't say I've thought deeply about this, but instance creation is wrapped in a transaction - so long as the side effects you are concerned about, including reads the store, they should be atomic due to BDB locking.
On Mar 18, 2010, at 6:37 AM, Alex Mizrahi wrote: > IE> Should be easy to add an index lookup to shared-initialize and a check > IE> in indexed slot access as to whether you are changing the unique value. > > Hmm, there is a problem with this and concurrency -- one thread does a > check, it passes and it inserts a value, and another thread does the same > thing. > Now there are two entries with same key, despite both checks passed. > > Or will locks in BDB prevent this? > > In PostgreSQL they do not, unless there is unique index in database. > > > > _______________________________________________ > elephant-devel site list > elephant-devel@common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel _______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel