From 5c1d2fe715ec516ea107f5f0eda2ac267beec737 Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Mon, 22 Jul 2024 11:16:46 +0200 Subject: [PATCH 1/5] Update AsyncKeyedLock to 7.0.0 --- .../Automatica.Core.Internals/Automatica.Core.Internals.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj b/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj index 7298f0d9..1014099d 100644 --- a/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj +++ b/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj @@ -19,7 +19,7 @@ - + From f9b3f343f9f65898a74b9dd8939d66347fee3f41 Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Mon, 11 Nov 2024 11:19:55 +0100 Subject: [PATCH 2/5] Bump AsyncKeyedLock to 7.1.3 --- .../Automatica.Core.Internals/Automatica.Core.Internals.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj b/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj index 1014099d..26bee2a4 100644 --- a/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj +++ b/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj @@ -19,7 +19,7 @@ - + From 94fa6690b27085a2f7eed067326eea63fb17b481 Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Mon, 11 Nov 2024 11:24:26 +0100 Subject: [PATCH 3/5] Use LockOrNullAsync for better performance --- src/automatica.core/Automatica.Push/Hubs/UpdateHub.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/automatica.core/Automatica.Push/Hubs/UpdateHub.cs b/src/automatica.core/Automatica.Push/Hubs/UpdateHub.cs index bcfab5c6..6887c53f 100644 --- a/src/automatica.core/Automatica.Push/Hubs/UpdateHub.cs +++ b/src/automatica.core/Automatica.Push/Hubs/UpdateHub.cs @@ -36,11 +36,11 @@ public Task StartUpdateDownload(ServerVersion version) { Task.Run(async () => { - using var releaser = await _asyncKeyedLocker.LockAsync(nameof(UpdateHub), 10).ConfigureAwait(false); - if (!releaser.EnteredSemaphore) + using var releaser = await _asyncKeyedLocker.LockOrNullAsync(nameof(UpdateHub), 10).ConfigureAwait(false); + if (releaser is null) { return; - } + } var previousState = 0; _api.DownloadUpdateProgressChanged += (sender, e) => @@ -72,8 +72,8 @@ private Task DownloadPlugin(Plugin plugin, bool install) { Task.Run(async () => { - using var releaser = await _asyncKeyedLocker.LockAsync(nameof(UpdateHub), 10).ConfigureAwait(false); - if (!releaser.EnteredSemaphore) + using var releaser = await _asyncKeyedLocker.LockOrNullAsync(nameof(UpdateHub), 10).ConfigureAwait(false); + if (releaser is null) { return; } From a8283131314b8f8590345a8d6b5e09144e8ee5b2 Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Thu, 4 Dec 2025 09:36:50 +0100 Subject: [PATCH 4/5] Bump AsyncKeyedLock to 7.1.8 --- .../Automatica.Core.Base/Automatica.Core.Base.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/automatica.core/Automatica.Core.Base/Automatica.Core.Base.csproj b/src/automatica.core/Automatica.Core.Base/Automatica.Core.Base.csproj index c344e0f4..512e7229 100644 --- a/src/automatica.core/Automatica.Core.Base/Automatica.Core.Base.csproj +++ b/src/automatica.core/Automatica.Core.Base/Automatica.Core.Base.csproj @@ -16,7 +16,7 @@ https://github.com/automatica-core - + @@ -35,4 +35,4 @@ - \ No newline at end of file + From 605516955805c4adeda57cb9e68b9a80145bc697 Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Thu, 4 Dec 2025 09:37:58 +0100 Subject: [PATCH 5/5] Bump AsyncKeyedLock to 7.1.8 --- .../Automatica.Core.Internals/Automatica.Core.Internals.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj b/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj index 26bee2a4..de5c664e 100644 --- a/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj +++ b/src/automatica.core/Automatica.Core.Internals/Automatica.Core.Internals.csproj @@ -19,7 +19,7 @@ - +