From 021985beac8747bd9b16b897b9d6fb2fc626ed53 Mon Sep 17 00:00:00 2001 From: Pippyyy Date: Tue, 30 Apr 2019 16:00:19 +0800 Subject: [PATCH] Update task runner to allow multi-threading on OSX Fixes bug #36. I think the issue is the original method "shares" the shell that is used by all the workers and therefore blocking other calls to that shell. Using subprocess.call with the shell=true is pretty much allowing each worker to spawn their own instance of a shell. --- Interlace/lib/threader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Interlace/lib/threader.py b/Interlace/lib/threader.py index 3e60d76..29a7a54 100644 --- a/Interlace/lib/threader.py +++ b/Interlace/lib/threader.py @@ -1,4 +1,5 @@ import threading +import subprocess import os @@ -20,7 +21,7 @@ class Worker(object): @staticmethod def run_task(task): - os.system(task) + subprocess.call(task, shell=true) class Pool(object):