Skip to content

Commit ac3720e

Browse files
author
BRUNER Patrick
committed
review comment
1 parent 88f17aa commit ac3720e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/LogExpert.Core/Classes/Log/Buffers/LogBufferCacheEntry.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ public LogBufferCacheEntry ()
2727

2828
public void Touch ()
2929
{
30-
_ = Interlocked.Exchange(ref _lastUseTimeStamp, Interlocked.Increment(ref _accessSequence));
30+
_ = Interlocked.Exchange(ref _lastUseTimeStamp, NextAccessSequence());
3131
}
3232

3333
#endregion
34+
35+
private static long NextAccessSequence ()
36+
{
37+
return Interlocked.Increment(ref _accessSequence);
38+
}
39+
3440
}

0 commit comments

Comments
 (0)