diff --git a/workflow/patterns/controlflow.py b/workflow/patterns/controlflow.py index a081aa4..f0526ed 100644 --- a/workflow/patterns/controlflow.py +++ b/workflow/patterns/controlflow.py @@ -395,7 +395,7 @@ def _synchronize(obj, eng): new_eng.setWorkflow(func) queue.put(lambda: new_eng.process([obj])) else: - queue.put(lambda: func(obj, eng)) + queue.put(lambda func=func:func(obj, eng)) # wait on the queue until everything has been processed queue.join_with_timeout(timeout) @@ -492,3 +492,4 @@ def __init__(self, itemq, *args, **kwargs): def run(self): call = self.itemq.get() call() + self.itemq.task_done()