[Neo-report] r2318 gregory - /trunk/neo/master/transactions.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 1 10:17:51 CEST 2010
Author: gregory
Date: Fri Oct 1 10:17:48 2010
New Revision: 2318
Log:
Use a set instead of a list.
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] Fri Oct 1 10:17:48 2010
@@ -35,7 +35,7 @@ class Transaction(object):
self._oid_list = oid_list
self._msg_id = msg_id
# uuid dict hold flag to known who has locked the transaction
- self._uuid_list = list(uuid_list)
+ self._uuid_set = set(uuid_list)
self._lock_wait_uuid_set = set(uuid_list)
self._birth = time()
@@ -45,7 +45,7 @@ class Transaction(object):
self._node,
dump(self._tid),
[dump(x) for x in self._oid_list],
- [dump(x) for x in self._uuid_list],
+ [dump(x) for x in self._uuid_set],
time() - self._birth,
id(self),
)
@@ -72,7 +72,7 @@ class Transaction(object):
"""
Returns the list of node's UUID that lock the transaction
"""
- return self._uuid_list
+ return list(self._uuid_set)
def getOIDList(self):
"""
More information about the Neo-report
mailing list