##// END OF EJS Templates
workers: add config to enable/diable workers...
Wojciech Lis -
r35447:471918fa default
parent child Browse files
Show More
@@ -1253,6 +1253,9 b" coreconfigitem('worker', 'backgroundclos"
1253 coreconfigitem('worker', 'backgroundclosethreadcount',
1253 coreconfigitem('worker', 'backgroundclosethreadcount',
1254 default=4,
1254 default=4,
1255 )
1255 )
1256 coreconfigitem('worker', 'enabled',
1257 default=True,
1258 )
1256 coreconfigitem('worker', 'numcpus',
1259 coreconfigitem('worker', 'numcpus',
1257 default=None,
1260 default=None,
1258 )
1261 )
@@ -2563,6 +2563,10 b' Parallel master/worker configuration. We'
2563 directory updates in parallel on Unix-like systems, which greatly
2563 directory updates in parallel on Unix-like systems, which greatly
2564 helps performance.
2564 helps performance.
2565
2565
2566 ``enabled``
2567 Whether to enable workers code to be used.
2568 (default: true)
2569
2566 ``numcpus``
2570 ``numcpus``
2567 Number of CPUs to use for parallel operations. A zero or
2571 Number of CPUs to use for parallel operations. A zero or
2568 negative value is treated as ``use the default``.
2572 negative value is treated as ``use the default``.
@@ -82,7 +82,8 b' def worker(ui, costperarg, func, statica'
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
General Comments 0
You need to be logged in to leave comments. Login now