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): ...@@ -35,7 +35,7 @@ class Transaction(object):
self._oid_list = oid_list self._oid_list = oid_list
self._msg_id = msg_id self._msg_id = msg_id
# uuid dict hold flag to known who has locked the transaction # 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._lock_wait_uuid_set = set(uuid_list)
self._birth = time() self._birth = time()
...@@ -45,7 +45,7 @@ class Transaction(object): ...@@ -45,7 +45,7 @@ class Transaction(object):
self._node, self._node,
dump(self._tid), dump(self._tid),
[dump(x) for x in self._oid_list], [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, time() - self._birth,
id(self), id(self),
) )
...@@ -72,7 +72,7 @@ class Transaction(object): ...@@ -72,7 +72,7 @@ class Transaction(object):
""" """
Returns the list of node's UUID that lock the transaction Returns the list of node's UUID that lock the transaction
""" """
return self._uuid_list return list(self._uuid_set)
def getOIDList(self): 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