Skip to content

Conversation

@maliming
Copy link
Member

@maliming maliming commented Dec 30, 2025

@maliming maliming marked this pull request as ready for review December 30, 2025 02:13
Copilot AI review requested due to automatic review settings December 30, 2025 02:13
@maliming maliming marked this pull request as draft December 30, 2025 02:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new KeyedLock utility class for per-key asynchronous locking based on a Stack Overflow solution, and refactors the local distributed locking implementation to use this new utility instead of managing SemaphoreSlim instances directly.

  • Adds KeyedLock static class providing lock/try-lock operations with per-key synchronization
  • Refactors LocalAbpDistributedLock to delegate to KeyedLock instead of managing semaphores directly
  • Simplifies LocalAbpDistributedLockHandle to wrap generic IDisposable instead of SemaphoreSlim

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
framework/src/Volo.Abp.Core/Volo/Abp/Threading/KeyedLock.cs New static utility class implementing per-key async locking with reference counting and automatic cleanup
framework/test/Volo.Abp.Core.Tests/Volo/Abp/Threading/KeyedLock_Tests.cs Comprehensive test suite for KeyedLock covering locking, timeouts, cancellation, and concurrency scenarios
framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs Refactored to use KeyedLock instead of ConcurrentDictionary of SemaphoreSlim instances
framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLockHandle.cs Simplified to wrap generic IDisposable instead of SemaphoreSlim directly, but missing namespace declaration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maliming maliming marked this pull request as ready for review December 30, 2025 04:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maliming maliming requested a review from EngincanV December 30, 2025 06:45
@EngincanV EngincanV merged commit e75babd into rel-10.0 Dec 30, 2025
3 checks passed
@EngincanV EngincanV deleted the KeyedLock branch December 30, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants