We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39675df commit 117c97bCopy full SHA for 117c97b
nipype/pipeline/plugins/legacymultiproc.py
@@ -90,7 +90,16 @@ def _set_daemon(self, value):
90
class NonDaemonPool(pool.Pool):
91
"""A process pool with non-daemon processes.
92
"""
93
- Process = NonDaemonProcess
+ def Process(self, *args, **kwds):
94
+ if hasattr(self, '_ctx'):
95
+ ctx = self._ctx
96
+ if isinstance(args[0], multiprocessing.context.BaseContext):
97
+ ctx = args.pop(0)
98
+ process = ctx.Process
99
+ kwds['daemon'] = False
100
+ else:
101
+ process = NonDaemonProcess
102
+ return process(*args, **kwds)
103
104
105
class LegacyMultiProcPlugin(DistributedPluginBase):
0 commit comments