--On 13. Oktober 2005 02:44:34 -0400 Chris Spencer <[EMAIL PROTECTED]> wrote:

I understand that, but my point was when you call transaction.commit(),
you don't necessarily know what you're committing. One thread may be
ready to commit. Another may not be. If one thread calls
transaction.abort(), they may be aborting changes made by another thread.
You'd have to write a complicated coordination mechanism to handle
multi-threaded transactions to be sure. If threading is limited to
connections, then wouldn't in make sense if transactions were as well?


I have no idea what you mean. Once again: when you are using multiple threads to write to the ZODB (as Zope does all the time) then usually every request is done with a dedicated transaction. The work within the threads happens isolated. Only at commit time an error might occurs when multiple thread write to the *same* object or one writes and one reads (already solved by using MVCC in Zope 2.8). NO idea what you mean by "complicated coordination". Hopefully you don't write code that spawns up threads that deal will the ZODB in an insane way. This is tricky and you should really know what you are doing in this case....this is for experienced developers only....

-aj

Attachment: pgpOG6TpLHYjw.pgp
Description: PGP signature

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to