[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:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to