diff --git a/r2/r2/lib/utils/utils.py b/r2/r2/lib/utils/utils.py index 3101763c0..4de11d78f 100644 --- a/r2/r2/lib/utils/utils.py +++ b/r2/r2/lib/utils/utils.py @@ -785,14 +785,17 @@ class Worker: fn = self.q.get() try: fn() + self.q.task_done() except: import traceback print traceback.format_exc() - def do(self, fn): self.q.put(fn) + def join(self): + self.q.join() + worker = Worker() def cols(lst, ncols):