From fc87901a89ca6db85cf1522a48fc69a35cfda295 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 18 Jul 2005 04:46:41 +0000 Subject: [PATCH] Added some more XXXes for dangerfan. --- src/utils/transaction.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/utils/transaction.py b/src/utils/transaction.py index 088c35540..dd271809d 100644 --- a/src/utils/transaction.py +++ b/src/utils/transaction.py @@ -93,6 +93,24 @@ class TransactionMixin(python.Object): class Transaction(TransactionMixin): + # XXX Transaction needs to be made threadsafe. + + # XXX There needs to be a way, given a transaction, to get a + # "sub-transaction", which: + # + # 1. Doesn't try to grab the txnDir and move it, but instead is just + # given the actual directory being used and uses that. + # 2. Acquires the lock of the original transaction, only releasing it + # when its .commit method is called (assuming Transaction is + # threadsafe). + # 3. Has a no-op .commit method (i.e., doesn't commit). + # + # This is so that, for instance, an object with an active Transaction + # can give other objects a Transaction-ish object without worrying that + # the transaction will be committed, while still allowing those objects + # to work properly with real transactions (i.e., they still call + # as they would on a normal Transaction, it just has no effect with a + # sub-transaction). def __init__(self, *args, **kwargs): """Transaction(root, txnDir) -> None