Skip to content

Commit c8bd982

Browse files
authored
Merge pull request #1 from MarkCiliaVincenti/AsyncKeyedLockPooling
Updated benchmark to use pooling
2 parents ff513bc + 1dd0b2b commit c8bd982

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/AsyncKeyLock.Benchmarks/BenchmarkSimpleKeyLock.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using BenchmarkDotNet.Attributes;
2-
using BenchmarkDotNet.Jobs;
32

43
namespace AsyncKeyLock.Benchmarks;
54

@@ -10,7 +9,10 @@ public class BenchmarkSimpleKeyLock
109
public void GlobalSetup()
1110
{
1211
_AsyncKeyLock = new AsyncLock<string>();
13-
_AsyncKeyedLock = new AsyncKeyedLock.AsyncKeyedLocker<string>();
12+
_AsyncKeyedLock = new AsyncKeyedLock.AsyncKeyedLocker<string>(o =>
13+
{
14+
o.PoolSize = NumberOfLocks;
15+
});
1416
_ImageSharpWebLock = new SixLabors.ImageSharp.Web.Synchronization.AsyncKeyLock<string>();
1517
}
1618

0 commit comments

Comments
 (0)