[Neo-report] r2571 vincent - /trunk/neo/master/transactions.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 23 18:56:56 CET 2010
Author: vincent
Date: Thu Dec 23 18:56:56 2010
New Revision: 2571
Log:
Factorise property access.
Modified:
trunk/neo/master/transactions.py
Modified: trunk/neo/master/transactions.py
==============================================================================
--- trunk/neo/master/transactions.py [iso-8859-1] (original)
+++ trunk/neo/master/transactions.py [iso-8859-1] Thu Dec 23 18:56:56 2010
@@ -399,14 +399,19 @@ class TransactionManager(object):
def _unlockPending(self):
# unlock pending transactions
- while self._queue:
- uuid, tid = self._queue.pop(0)
- txn = self._tid_dict.get(tid, None)
+ queue = self._queue
+ pop = queue.pop
+ insert = queue.insert
+ on_commit = self._on_commit
+ get = self._tid_dict.get
+ while queue:
+ uuid, tid = pop(0)
+ txn = get(tid, None)
# _queue can contain un-prepared transactions
if txn is not None and txn.locked():
- self._on_commit(tid, txn)
+ on_commit(tid, txn)
else:
- self._queue.insert(0, (uuid, tid))
+ insert(0, (uuid, tid))
break
def abortFor(self, node):
More information about the Neo-report
mailing list