Browse Source

added isEmpty()

Darren Ranalli 20 năm trước cách đây
mục cha
commit
975edf09cd
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      direct/src/distributed/CRCache.py

+ 3 - 0
direct/src/distributed/CRCache.py

@@ -11,6 +11,9 @@ class CRCache:
         self.dict = {}
         self.fifo = []
 
+    def isEmpty(self):
+        return len(self.fifo) == 0
+
     def flush(self):
         """
         Delete each item in the cache then clear all references to them