Skip to content

Commit

Permalink
Merge pull request #40 from zopefoundation/wtf-newTransaction
Browse files Browse the repository at this point in the history
Document why newTransaction is only called by begin.
  • Loading branch information
jimfulton committed Dec 15, 2016
2 parents 3745921 + 7956161 commit 7838b4c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions transaction/interfaces.py
Expand Up @@ -22,12 +22,19 @@ class ITransactionManager(Interface):
"""

def begin():
"""Begin a new transaction.
"""Explicitly begin a new transaction.
If an existing transaction is in progress, it will be aborted.
The newTransaction() method of registered synchronizers is called,
The ``newTransaction`` method of registered synchronizers is called,
passing the new transaction object.
Note that transactions may be started implicitly without
calling ``begin``. In that case, ``newTransaction`` isn't
called because the transaction manager doesn't know when to
call it. The transaction is likely to have begun long before
the transaction manager is involved. (Conceivably 'commit' and
'abort' could call 'begin', but they don't.)
"""

def get():
Expand Down

0 comments on commit 7838b4c

Please sign in to comment.