Merge branch 'master' of ssh://git.planet-lab.org/git/sfa
[sfa.git] / sfa / util / threadmanager.py
old mode 100755 (executable)
new mode 100644 (file)
index 4ce578f..b47b818
@@ -2,7 +2,7 @@ import threading
 import traceback
 import time
 from Queue import Queue
-from sfa.util.sfa.logging import logger
+from sfa.util.sfalogging import logger
 
 def ThreadedMethod(callable, results, errors):
     """
@@ -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):
         """