Commit 8fff33c1 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use a set instead of a list.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2318 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 91bffe26
......@@ -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):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment