equal
deleted
inserted
replaced
80 staticargs - arguments to pass to every invocation of the function |
80 staticargs - arguments to pass to every invocation of the function |
81 |
81 |
82 args - arguments to split into chunks, to pass to individual |
82 args - arguments to split into chunks, to pass to individual |
83 workers |
83 workers |
84 ''' |
84 ''' |
85 if worthwhile(ui, costperarg, len(args)): |
85 enabled = ui.configbool('worker', 'enabled') |
|
86 if enabled and worthwhile(ui, costperarg, len(args)): |
86 return _platformworker(ui, func, staticargs, args) |
87 return _platformworker(ui, func, staticargs, args) |
87 return func(*staticargs + (args,)) |
88 return func(*staticargs + (args,)) |
88 |
89 |
89 def _posixworker(ui, func, staticargs, args): |
90 def _posixworker(ui, func, staticargs, args): |
90 rfd, wfd = os.pipe() |
91 rfd, wfd = os.pipe() |