Skip to content

Commit 0c6dd7f

Browse files
authored
Use Timeout.InfiniteTimeSpan (#668)
1 parent da00197 commit 0c6dd7f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

BitFaster.Caching/Lru/Defaults.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ namespace BitFaster.Caching.Lru
66
{
77
internal static class Defaults
88
{
9-
public static int ConcurrencyLevel
10-
{
11-
get { return Environment.ProcessorCount; }
12-
}
13-
14-
public static readonly TimeSpan Infinite = new(0, 0, 0, 0, -1);
9+
public static int ConcurrencyLevel => Environment.ProcessorCount;
1510
}
1611
}

BitFaster.Caching/Lru/LruPolicy.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Runtime.CompilerServices;
3+
using System.Threading;
34

45
namespace BitFaster.Caching.Lru
56
{
@@ -10,7 +11,7 @@ namespace BitFaster.Caching.Lru
1011
where K : notnull
1112
{
1213
///<inheritdoc/>
13-
public TimeSpan TimeToLive => Defaults.Infinite;
14+
public TimeSpan TimeToLive => Timeout.InfiniteTimeSpan;
1415

1516
///<inheritdoc/>
1617
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)