From be4d6bc07ccc5eaf9e1433463ea91f19a1843f69 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 13 Apr 2016 10:23:43 -0700 Subject: [PATCH] Limit parallelism in ci-pull --- makefile.shade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefile.shade b/makefile.shade index ac010f7868..0b63d5a356 100644 --- a/makefile.shade +++ b/makefile.shade @@ -115,13 +115,15 @@ var buildTarget = "compile" #ci-pull @{ + var threads = int.Parse(Environment.GetEnvironmentVariable("UNIVERSE_THREADS") ?? "4"); + var blockLogger = Log as IBlockLogger; if (blockLogger != null) { blockLogger.StartBlock("Cloning repos"); } - Parallel.ForEach(repositories, repo => + Parallel.ForEach(repositories, new ParallelOptions { MaxDegreeOfParallelism = threads }, repo => { var useBuildBranch = true; if (Directory.Exists(repo))