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 f2de331 commit 25ccb15Copy full SHA for 25ccb15
maestro/core/module.py
@@ -41,7 +41,21 @@ def _set_daemon(self, value):
41
42
43
class NonDaemonizedPool(Pool):
44
- Process = NoDaemonProcess
+ def Process(self, *args, **kwds):
45
+ proc = super(NonDaemonizedPool, self).Process(*args, **kwds)
46
+
47
+ class NonDaemonProcess(proc.__class__):
48
+ """Monkey-patch process to ensure it is never daemonized"""
49
+ @property
50
+ def daemon(self):
51
+ return False
52
53
+ @daemon.setter
54
+ def daemon(self, val):
55
+ pass
56
57
+ proc.__class__ = NonDaemonProcess
58
+ return proc
59
60
# TODO: change modules to accept kwargs and args
61
0 commit comments