Skip to content

Commit

Permalink
Document why newTransaction is only called by begin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Dec 15, 2016
1 parent 3745921 commit d7d2e91
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions transaction/interfaces.py
Original file line number Diff line number Diff line change
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 begin 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 d7d2e91

Please sign in to comment.