Skip to content

Commit

Permalink
Use System.Threading.Lock
Browse files Browse the repository at this point in the history
Use `System.Threading.Lock` instead of an object to resolve `IDE0330` warning in .NET 9 preview 7.
  • Loading branch information
martincostello committed Jul 11, 2024
1 parent e0053ca commit 52fcca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ProjectEuler/Puzzles/Puzzle014.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed class Puzzle014 : Puzzle
/// </summary>
private static readonly Dictionary<long, int> _cache = new(1_000_000);

private static readonly object _lock = new();
private static readonly System.Threading.Lock _lock = new();

/// <inheritdoc />
public override string Question => "Which starting number, under one million, produces the longest chain?";
Expand Down

0 comments on commit 52fcca0

Please sign in to comment.