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.
This commit is contained in:
Pippyyy
2019-04-30 16:00:19 +08:00
committed by GitHub
parent eeb371b50a
commit 021985beac

View File

@@ -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):