Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/AppAlertService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace SysManager.Services;
public sealed class AppAlertService : IDisposable
{
private readonly List<FileSystemWatcher> _watchers = new();
private readonly object _watcherLock = new();
private readonly Lock _watcherLock = new();
private readonly ConcurrentDictionary<string, bool> _knownFolders = new(StringComparer.OrdinalIgnoreCase);
private readonly ConcurrentDictionary<string, bool> _knownRegistryApps = new(StringComparer.OrdinalIgnoreCase);
private readonly SynchronizationContext? _syncContext;
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/IconExtractorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public sealed partial class IconExtractorService
{
private static readonly ConcurrentDictionary<string, ImageSource?> _cache = new(StringComparer.OrdinalIgnoreCase);
private static readonly Queue<string> _insertionOrder = new();
private static readonly object _evictionLock = new();
private static readonly Lock _evictionLock = new();

/// <summary>Maximum number of cached icons before eviction kicks in.</summary>
public static int MaxCacheSize { get; set; } = 500;
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/PingMonitorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public sealed class PingMonitorService : IDisposable

private CancellationTokenSource? _cts;
private Task? _loop;
private readonly object _stateLock = new();
private readonly Lock _stateLock = new();

public bool IsRunning => _loop is { IsCompleted: false };

Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/Services/SystemInfoService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class SystemInfoService
private OsInfo? _cachedOs;
private CpuInfo? _cachedCpuStatic;
private List<DiskInfo>? _cachedDisks;
private readonly object _cacheLock = new();
private readonly Lock _cacheLock = new();

public Task<SystemSnapshot> CaptureAsync(CancellationToken ct = default)
=> Task.Run(() => Capture(), ct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class TracerouteMonitorService : IDisposable

private CancellationTokenSource? _cts;
private Task? _loop;
private readonly object _stateLock = new();
private readonly Lock _stateLock = new();

public bool IsRunning => _loop is { IsCompleted: false };

Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/ViewModels/ConsoleViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace SysManager.ViewModels;
public sealed partial class ConsoleViewModel : ObservableObject
{
private const int MaxLines = 5000;
private readonly object _gate = new();
private readonly Lock _gate = new();

public ObservableCollection<PowerShellLine> Lines { get; } = new();

Expand Down
Loading