• Jeremy Hylton's avatar
    Merge jeremy-atomic-invalidation-branch. · c7f79a47
    Jeremy Hylton authored
    Add suspend() and resume() to transaction manager API.
    Change implementation so that the thread-aware manager does not
    inherit from the thread-agnostic manager.
    Add suspended transaction state.
    c7f79a47
__init__.py 837 Bytes
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

from transaction.manager import ThreadedTransactionManager

_manager = ThreadedTransactionManager()
get_transaction = _manager.get

def set_factory(factory):
    _manager.txn_factory = factory