Browse Source

Windows: Weird LimitSet bug

Ask Solem 11 years ago
parent
commit
b185133754
1 changed files with 2 additions and 2 deletions
  1. 2 2
      celery/datastructures.py

+ 2 - 2
celery/datastructures.py

@@ -557,8 +557,8 @@ class LimitedSet(object):
         self._data = {} if data is None else data
         self._heap = [] if heap is None else heap
         # make shortcuts
-        self.__iter__ = self._data.__iter__
-        self.__len__ = self._data.__len__
+        self.__len__ = self._heap.__len__
+        self.__iter__ = self._heap.__iter__
         self.__contains__ = self._data.__contains__
 
     def add(self, value, now=time.time):