File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class MultiProcPlugin(DistributedPluginBase):
44
44
execution. Currently supported options are:
45
45
46
46
- n_procs : number of processes to use
47
+ - non_daemon : boolean flag to execute as non-daemon processes
47
48
48
49
"""
49
50
@@ -52,10 +53,17 @@ def __init__(self, plugin_args=None):
52
53
self ._taskresult = {}
53
54
self ._taskid = 0
54
55
n_procs = 1
56
+ non_daemon = False
55
57
if plugin_args :
56
58
if 'n_procs' in plugin_args :
57
59
n_procs = plugin_args ['n_procs' ]
58
- self .pool = Pool (processes = n_procs )
60
+ if 'non_daemon' in plugin_args :
61
+ non_daemon = plugin_args ['non_daemon' ]
62
+ if non_daemon :
63
+ # run the execution using the non-daemon pool subclass
64
+ self .pool = NonDaemonPool (processes = n_procs )
65
+ else :
66
+ self .pool = Pool (processes = n_procs )
59
67
60
68
def _get_result (self , taskid ):
61
69
if taskid not in self ._taskresult :
You can’t perform that action at this time.
0 commit comments