From 35f25b55f32c4fe8974611d1532119e5ba7c058f Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Sun, 13 Oct 2024 17:50:41 +0200 Subject: [PATCH] Performance improvement for .NET Core 3.0 and 3.1. --- AsyncKeyedLock/AsyncKeyedLock.csproj | 10 +++++----- AsyncKeyedLock/AsyncKeyedLockOptions.cs | 2 +- AsyncKeyedLock/AsyncKeyedLocker.cs | 2 +- Directory.Packages.props | 9 +++++---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/AsyncKeyedLock/AsyncKeyedLock.csproj b/AsyncKeyedLock/AsyncKeyedLock.csproj index b4ff9b9..8230588 100644 --- a/AsyncKeyedLock/AsyncKeyedLock.csproj +++ b/AsyncKeyedLock/AsyncKeyedLock.csproj @@ -7,16 +7,16 @@ https://github.com/MarkCiliaVincenti/AsyncKeyedLock MIT MIT - 7.0.1 + 7.0.2 logo.png - Deterministic builds, AOT and trimming. + Performance improvement for .NET Core 3.0 and 3.1. 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. © 2024 Mark Cilia Vincenti async,lock,key,keyed,semaphore,striped,dictionary,concurrentdictionary,pooling,duplicate,synchronization git false - 7.0.1.0 - 7.0.1.0 + 7.0.2.0 + 7.0.2.0 README.md true True @@ -59,7 +59,7 @@ - + diff --git a/AsyncKeyedLock/AsyncKeyedLockOptions.cs b/AsyncKeyedLock/AsyncKeyedLockOptions.cs index 31c4035..25dd325 100644 --- a/AsyncKeyedLock/AsyncKeyedLockOptions.cs +++ b/AsyncKeyedLock/AsyncKeyedLockOptions.cs @@ -42,6 +42,6 @@ public AsyncKeyedLockOptions(int maxCount = 1, int poolSize = 20, int poolInitia /// Default lock options for the constructors. /// Sets to 1, to 20 and to 1. /// - public static AsyncKeyedLockOptions Default => new AsyncKeyedLockOptions(); + public static AsyncKeyedLockOptions Default => new(); } } \ No newline at end of file diff --git a/AsyncKeyedLock/AsyncKeyedLocker.cs b/AsyncKeyedLock/AsyncKeyedLocker.cs index ebddbbe..f2252ea 100644 --- a/AsyncKeyedLock/AsyncKeyedLocker.cs +++ b/AsyncKeyedLock/AsyncKeyedLocker.cs @@ -156,7 +156,7 @@ public AsyncKeyedLocker(Action options, int concurrencyLe public class AsyncKeyedLocker : IDisposable where TKey : notnull { internal readonly AsyncKeyedLockDictionary _dictionary; - private static readonly EmptyDisposable _emptyDisposable = new EmptyDisposable(); + private static readonly EmptyDisposable _emptyDisposable = new(); /// /// Read-only index of objects held by . diff --git a/Directory.Packages.props b/Directory.Packages.props index c0e2b9d..463df2c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,15 +3,16 @@ true + - - + + - + - + \ No newline at end of file