[Jeremy Hylton]
> I don't have anything invested in the decision, but synchronizers were
> intended to support this use case.  They provide a way for arbitrary
> application code to observe the transaction boundaries without pretending
> to be a data manager.

There are two big differences here I know about:

1. Synchronizers are registered with transaction managers rather than
   with transactions.  So once you register a synchronizer, new
   transactions continue to invoke it.  The proposed gimmick only
   applies to a single transaction.

2. The synchronizer beforeCompletion() method is invoked on transaction
   abort as well as transaction commit.  The proposed gimmick is invoked
   only on transaction commit.

There's one seeming difference that isn't much of a difference:
{before,after}Completion() are called with a single argument, the
transaction object.  The proposal passes an arbitrary collection of
arguments to the hook function. 

_______________________________________________
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