ThreadManager variables should be instance variables not class variables
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Fri, 5 Aug 2011 00:18:44 +0000 (20:18 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Fri, 5 Aug 2011 00:18:44 +0000 (20:18 -0400)
sfa/util/threadmanager.py

index 5f80670..b47b818 100755 (executable)
@@ -31,9 +31,11 @@ class ThreadManager:
     ThreadManager executes a callable in a thread and stores the result
     in a thread safe queue. 
     """
-    results = Queue()
-    errors = Queue()
-    threads = []
+
+    def __init__(self):
+        self.results = Queue()
+        self.errors = Queue()
+        self.threads = []
 
     def run (self, method, *args, **kwds):
         """