Commit 759a9ae3 authored by Antoine Millet's avatar Antoine Millet

Handle duplicated locks in Acquires class constructor.

parent 2ab589f7
......@@ -27,7 +27,7 @@ class Acquires(object):
def __init__(self, *locks):
self._locks = sorted(locks, key=lambda x: id(x))
self._locks = sorted(set(locks), key=lambda x: id(x))
def __enter__(self):
for lock in self._locks:
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