Merge pull request #83798 from ryneeverett/vim-plugins-update-proc
vimPlugins: Add --proc flag to update script.
This commit is contained in:
commit
d2e422fcef
@ -477,6 +477,14 @@ def parse_args():
|
|||||||
default=DEFAULT_OUT,
|
default=DEFAULT_OUT,
|
||||||
help="Filename to save generated nix code",
|
help="Filename to save generated nix code",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--proc",
|
||||||
|
"-p",
|
||||||
|
dest="proc",
|
||||||
|
type=int,
|
||||||
|
default=30,
|
||||||
|
help="Number of concurrent processes to spawn.",
|
||||||
|
)
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
@ -491,9 +499,7 @@ def main() -> None:
|
|||||||
prefetch_with_cache = functools.partial(prefetch, cache=cache)
|
prefetch_with_cache = functools.partial(prefetch, cache=cache)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# synchronous variant for debugging
|
pool = Pool(processes=args.proc)
|
||||||
# results = list(map(prefetch_with_cache, plugin_names))
|
|
||||||
pool = Pool(processes=30)
|
|
||||||
results = pool.map(prefetch_with_cache, plugin_names)
|
results = pool.map(prefetch_with_cache, plugin_names)
|
||||||
finally:
|
finally:
|
||||||
cache.store()
|
cache.store()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user