[Zope-dev] ThreadSafeCounter 0.0.1 released
Martijn Pieters
mj@digicool.com
Mon, 12 Feb 2001 10:27:02 +0100
On Mon, Feb 12, 2001 at 01:31:04AM +0100, Morten W. Petersen wrote:
> As I've understood it, two threads serving requests have a copy each of the
> database, and only when changes are committed are they reflected in
> the database. Therefore, two requests created at the same time could
> get an identical copy and therefore and identical value.
The ZODB will invalidate and force a retry on one of the connections.
Chris's code is threadsafe and will result in unique, sequential values.
See the ZODB UML documentation for details:
http://www.zope.org/Documentation/Developer/Models/ZODB/
--
Martijn Pieters
| Software Engineer mailto:mj@digicool.com
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------