mirror of
https://github.com/codingo/Interlace.git
synced 2026-02-10 01:14:28 +01:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user