diff options
author | Lluis Sanchez <llsan@microsoft.com> | 2017-09-18 16:23:48 +0300 |
---|---|---|
committer | Lluis Sanchez <llsan@microsoft.com> | 2017-09-18 16:23:48 +0300 |
commit | cb796ac08c6b5e49ad171a455226a0a03b0976ed (patch) | |
tree | f59ada8b779a8854440321081fb839ab60326e97 /main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs | |
parent | 9a9e625b9921b408a2485912cdd8ba35e8b72c4b (diff) |
Fix parallel builds
Also added unit test
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs index b024f9b48e..2c28218fa8 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/RemoteBuildEngineManager.cs @@ -172,21 +172,21 @@ namespace MonoDevelop.Projects.MSBuild // Find builders which are not being shut down - var candiateBuilders = builders.GetBuilders (builderKey).Where (b => !b.IsShuttingDown); + var candiateBuilders = builders.GetBuilders (builderKey).Where (b => !b.IsShuttingDown && (!b.IsBusy || allowBusy)); if (buildSessionId != null) { - // Look for a builder that already started the session, no matter if the builder is busy or not. + // Look for a builder that already started the session. // If there isn't one, pick builders which don't have any session assigned, so a new one // can be started. var sessionBuilders = candiateBuilders.Where (b => b.BuildSessionId == buildSessionId); if (!sessionBuilders.Any ()) - sessionBuilders = candiateBuilders.Where (b => b.BuildSessionId == null && (!b.IsBusy || allowBusy)); + sessionBuilders = candiateBuilders.Where (b => b.BuildSessionId == null); candiateBuilders = sessionBuilders; } else // Pick builders which are not bound to any session - candiateBuilders = candiateBuilders.Where (b => b.BuildSessionId == null && (!b.IsBusy || allowBusy)); + candiateBuilders = candiateBuilders.Where (b => b.BuildSessionId == null); // Prefer non-busy builders |