Skip to content

Commit

Permalink
Performance improvement for .NET Core 3.0 and 3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Oct 13, 2024
1 parent e2f9720 commit 35f25b5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions AsyncKeyedLock/AsyncKeyedLock.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<PackageProjectUrl>https://github.com/MarkCiliaVincenti/AsyncKeyedLock</PackageProjectUrl>
<Copyright>MIT</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>7.0.1</Version>
<Version>7.0.2</Version>
<PackageIcon>logo.png</PackageIcon>
<PackageReleaseNotes>Deterministic builds, AOT and trimming.</PackageReleaseNotes>
<PackageReleaseNotes>Performance improvement for .NET Core 3.0 and 3.1.</PackageReleaseNotes>
<Description>An asynchronous .NET Standard 2.0 library that allows you to lock based on a key (keyed semaphores), limiting concurrent threads sharing the same key to a specified number, with optional pooling for reducing memory allocations.</Description>
<Copyright>© 2024 Mark Cilia Vincenti</Copyright>
<PackageTags>async,lock,key,keyed,semaphore,striped,dictionary,concurrentdictionary,pooling,duplicate,synchronization</PackageTags>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AssemblyVersion>7.0.1.0</AssemblyVersion>
<FileVersion>7.0.1.0</FileVersion>
<AssemblyVersion>7.0.2.0</AssemblyVersion>
<FileVersion>7.0.2.0</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IsPackable>true</IsPackable>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand Down Expand Up @@ -59,7 +59,7 @@
</None>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0'))">
<PackageReference Include="System.Threading.Tasks.Extensions" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion AsyncKeyedLock/AsyncKeyedLockOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public AsyncKeyedLockOptions(int maxCount = 1, int poolSize = 20, int poolInitia
/// Default lock options for the <see cref="AsyncKeyedLocker"/> constructors.
/// Sets <see cref="MaxCount"/> to 1, <see cref="PoolSize"/> to 20 and <see cref="PoolInitialFill"/> to 1.
/// </summary>
public static AsyncKeyedLockOptions Default => new AsyncKeyedLockOptions();
public static AsyncKeyedLockOptions Default => new();
}
}
2 changes: 1 addition & 1 deletion AsyncKeyedLock/AsyncKeyedLocker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public AsyncKeyedLocker(Action<AsyncKeyedLockOptions> options, int concurrencyLe
public class AsyncKeyedLocker<TKey> : IDisposable where TKey : notnull
{
internal readonly AsyncKeyedLockDictionary<TKey> _dictionary;
private static readonly EmptyDisposable _emptyDisposable = new EmptyDisposable();
private static readonly EmptyDisposable _emptyDisposable = new();

/// <summary>
/// Read-only index of objects held by <see cref="AsyncKeyedLocker{TKey}"/>.
Expand Down
9 changes: 5 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Backport.System.Threading.Lock" Version="2.0.3" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.4" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
<PackageVersion Include="ListShuffle" Version="2.1.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>

0 comments on commit 35f25b5

Please sign in to comment.