mercurial/worker.py
changeset 35431 471918fa7f46
parent 35428 71427ff1dff8
child 35432 86b8cc1f244e
equal deleted inserted replaced
35428:71427ff1dff8 35431:471918fa7f46
    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()