Skip to content

Commit 92530ca

Browse files
authored
Merge branch 'main' into users/alexpeck/skipinit
2 parents 176e041 + 5c2a527 commit 92530ca

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

BitFaster.Caching.UnitTests/Buffers/MpmcBoundedBufferSoakTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public MpmcBoundedBufferSoakTests(ITestOutputHelper testOutputHelper)
2222
}
2323

2424
[Theory]
25-
[Repeat(3)]
25+
[Repeat(10)]
2626
public async Task WhenAddIsContendedBufferCanBeFilled(int iteration)
2727
{
2828
this.testOutputHelper.WriteLine($"Iteration {iteration}");

BitFaster.Caching.UnitTests/Buffers/MpscBoundedBufferSoakTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public MpscBoundedBufferSoakTests(ITestOutputHelper testOutputHelper)
2222
}
2323

2424
[Theory]
25-
[Repeat(3)]
25+
[Repeat(10)]
2626
public async Task WhenAddIsContendedBufferCanBeFilled(int iteration)
2727
{
2828
this.testOutputHelper.WriteLine($"Iteration {iteration}");

BitFaster.Caching/Lfu/ConcurrentLfu.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,13 @@ public void Trim(int itemCount)
188188
TakeCandidatesInLruOrder(this.probationLru, candidates, itemCount);
189189
TakeCandidatesInLruOrder(this.protectedLru, candidates, itemCount);
190190
TakeCandidatesInLruOrder(this.windowLru, candidates, itemCount);
191-
}
192-
191+
}
192+
193+
#if NET6_0_OR_GREATER
194+
foreach (var candidate in CollectionsMarshal.AsSpan(candidates))
195+
#else
193196
foreach (var candidate in candidates)
197+
#endif
194198
{
195199
this.TryRemove(candidate.Key);
196200
}

0 commit comments

Comments
 (0)