File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 1- using System ;
1+ using System . Threading ;
22using System . Threading . Tasks ;
33
4- namespace Volo . Abp . DistributedLocking ;
5-
6- public class LocalAbpDistributedLockHandle : IAbpDistributedLockHandle
4+ namespace Volo . Abp . DistributedLocking
75{
8- private readonly IDisposable _disposable ;
9-
10- public LocalAbpDistributedLockHandle ( IDisposable disposable )
6+ public class LocalAbpDistributedLockHandle : IAbpDistributedLockHandle
117 {
12- _disposable = disposable ;
13- }
8+ private readonly SemaphoreSlim _semaphore ;
149
15- public ValueTask DisposeAsync ( )
16- {
17- _disposable . Dispose ( ) ;
18- return default ;
10+ public LocalAbpDistributedLockHandle ( SemaphoreSlim semaphore )
11+ {
12+ _semaphore = semaphore ;
13+ }
14+
15+ public ValueTask DisposeAsync ( )
16+ {
17+ _semaphore . Release ( ) ;
18+ return default ;
19+ }
1920 }
2021}
You can’t perform that action at this time.
0 commit comments