File tree 3 files changed +17
-6
lines changed
src/Microsoft.TemplateEngine.Edge/Constraints
3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 2
2
<Dependencies >
3
3
<ProductDependencies >
4
4
<!-- Intermediate is necessary for source build. -->
5
- <Dependency Name =" Microsoft.SourceBuild.Intermediate.source-build-externals" Version =" 9.0.0-alpha.1.24575.1 " >
5
+ <Dependency Name =" Microsoft.SourceBuild.Intermediate.source-build-externals" Version =" 9.0.0-alpha.1.24515.2 " >
6
6
<Uri >https://github.com/dotnet/source-build-externals</Uri >
7
- <Sha >ab469606a3e6b026dcac301e2dab96117c94faeb </Sha >
7
+ <Sha >659bf534d9fbf673493b821be99df12032277549 </Sha >
8
8
<SourceBuild RepoName =" source-build-externals" ManagedOnly =" true" />
9
9
</Dependency >
10
10
<!-- Intermediate is necessary for source build. -->
Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<PropertyGroup >
3
- <VersionPrefix >9.0.105 </VersionPrefix >
3
+ <VersionPrefix >9.0.203 </VersionPrefix >
4
4
<!-- When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages -->
5
5
<StabilizePackageVersion Condition =" '$(StabilizePackageVersion)' == ''" >true</StabilizePackageVersion >
6
6
<DotNetFinalVersionKind Condition =" '$(StabilizePackageVersion)' == 'true'" >release</DotNetFinalVersionKind >
7
7
<!-- Calculate prerelease label -->
8
- <PreReleaseVersionLabel Condition =" '$(StabilizePackageVersion)' != 'true'" >rtm </PreReleaseVersionLabel >
8
+ <PreReleaseVersionLabel Condition =" '$(StabilizePackageVersion)' != 'true'" >preview </PreReleaseVersionLabel >
9
9
<PreReleaseVersionLabel Condition =" '$(StabilizePackageVersion)' == 'true' and $(VersionPrefix.EndsWith('00'))" >rtm</PreReleaseVersionLabel >
10
10
<PreReleaseVersionLabel Condition =" '$(StabilizePackageVersion)' == 'true' and !$(VersionPrefix.EndsWith('00'))" >servicing</PreReleaseVersionLabel >
11
11
<PreReleaseVersionIteration Condition =" '$(StabilizePackageVersion)' != 'true'" >
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ namespace Microsoft.TemplateEngine.Edge.Constraints
11
11
{
12
12
public sealed class WorkloadConstraintFactory : ITemplateConstraintFactory
13
13
{
14
+ private static readonly SemaphoreSlim Mutex = new ( 1 ) ;
15
+
14
16
Guid IIdentifiedComponent . Id { get ; } = Guid . Parse ( "{F8BA5B13-7BD6-47C8-838C-66626526817B}" ) ;
15
17
16
18
string ITemplateConstraintFactory . Type => "workload" ;
@@ -97,8 +99,17 @@ private static IEnumerable<string> ParseArgs(string? args)
97
99
}
98
100
99
101
token . ThrowIfCancellationRequested ( ) ;
100
- IEnumerable < WorkloadInfo > currentProviderWorkloads = await providers [ 0 ] . GetInstalledWorkloadsAsync ( token ) . ConfigureAwait ( false ) ;
101
- workloads = currentProviderWorkloads . ToList ( ) ;
102
+
103
+ await Mutex . WaitAsync ( token ) . ConfigureAwait ( false ) ;
104
+ try
105
+ {
106
+ IEnumerable < WorkloadInfo > currentProviderWorkloads = await providers [ 0 ] . GetInstalledWorkloadsAsync ( token ) . ConfigureAwait ( false ) ;
107
+ workloads = currentProviderWorkloads . ToList ( ) ;
108
+ }
109
+ finally
110
+ {
111
+ Mutex . Release ( ) ;
112
+ }
102
113
103
114
if ( workloads . Select ( w => w . Id ) . HasDuplicates ( StringComparer . InvariantCultureIgnoreCase ) )
104
115
{
You can’t perform that action at this time.
0 commit comments