From ef4b596fb14d5ef07961605445da796ad1bbc665 Mon Sep 17 00:00:00 2001 From: Lluis Sanchez Date: Thu, 17 Sep 2015 15:33:11 +0200 Subject: [Core] Fix project builder issue Looks like remoting has concurrency problems, since the builder stops responding when doing many calls at once. As a temporary workaround, I'm adding a lock on the engine, so that only one call is made at a time. --- .../RemoteProjectBuilder.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'main') diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs index 97c78beec2..1e08a4e2a5 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs @@ -289,10 +289,13 @@ namespace MonoDevelop.Projects.Formats.MSBuild MSBuildResult result; try { BeginOperation (); - result = builder.Run ( - configurations, null, MSBuildVerbosity.Normal, - new [] { "ResolveAssemblyReferences" }, new [] { "ReferencePath" }, null, null, taskId - ); + lock (engine) { + // FIXME: This lock should not be necessary, but remoting seems to have problems when doing many concurrent calls. + result = builder.Run ( + configurations, null, MSBuildVerbosity.Normal, + new [] { "ResolveAssemblyReferences" }, new [] { "ReferencePath" }, null, null, taskId + ); + } } catch (Exception ex) { CheckDisconnected (); LoggingService.LogError ("ResolveAssemblyReferences failed", ex); -- cgit v1.2.3