diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2015-09-17 16:33:11 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2015-09-17 16:33:11 +0300 |
commit | ef4b596fb14d5ef07961605445da796ad1bbc665 (patch) | |
tree | 6371dcf6f6f5dbf7b6983cec299bbcda516de197 /main | |
parent | 8cbfcb6036208275fde19d87fa5b60f01a3a9a14 (diff) |
[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.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs | 11 |
1 files changed, 7 insertions, 4 deletions
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); |