Introducing a in progress sentinel that gets verified before running the first time experience. If we can get a handle for this sentinel, we proceed with the first time run, otherwise, it means there is a first time experience running already, in which case we continue running dotnet normally, even though the final (real) sentinel is not present yet. This prevents multiple dotnet commands from running the first time experience in parallel and prevents us from running into parallel nuget restores.
This commit is contained in:
parent
ed7e583ab6
commit
105e5ab051
12 changed files with 240 additions and 25 deletions
|
@ -166,17 +166,19 @@ namespace Microsoft.DotNet.Cli
|
|||
{
|
||||
using (var nugetPackagesArchiver = new NuGetPackagesArchiver())
|
||||
{
|
||||
var environmentProvider = new EnvironmentProvider();
|
||||
var nugetCacheSentinel = new NuGetCacheSentinel();
|
||||
var commandFactory = new DotNetCommandFactory();
|
||||
var nugetCachePrimer =
|
||||
new NuGetCachePrimer(commandFactory, nugetPackagesArchiver, nugetCacheSentinel);
|
||||
var dotnetConfigurer = new DotnetFirstTimeUseConfigurer(
|
||||
nugetCachePrimer,
|
||||
nugetCacheSentinel,
|
||||
environmentProvider);
|
||||
using (var nugetCacheSentinel = new NuGetCacheSentinel())
|
||||
{
|
||||
var environmentProvider = new EnvironmentProvider();
|
||||
var commandFactory = new DotNetCommandFactory();
|
||||
var nugetCachePrimer =
|
||||
new NuGetCachePrimer(commandFactory, nugetPackagesArchiver, nugetCacheSentinel);
|
||||
var dotnetConfigurer = new DotnetFirstTimeUseConfigurer(
|
||||
nugetCachePrimer,
|
||||
nugetCacheSentinel,
|
||||
environmentProvider);
|
||||
|
||||
dotnetConfigurer.Configure();
|
||||
dotnetConfigurer.Configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue