Files
PrimeBuild-pc 88f276706c feat: say when custom masks were drawn for a different CPU
Built-in masks are re-derived when the logical CPU count changes, because
ThreadPilot knows what "All Cores" is supposed to mean. A mask the user drew
is not ThreadPilot's to redraw: only they know whether the CPUs that appeared
belong in it. Until now those masks just kept selecting the old cores in
silence, under a name that no longer described them.

The Masks tab now says which ones need a look, and only when the core count
came from a successful topology detection - resizing or accusing on the
strength of Environment.ProcessorCount, which under-reports under affinity
limits, would be worse than saying nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 23:38:13 +02:00

51 lines
1.4 KiB
C#

namespace ThreadPilot.Services
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using ThreadPilot.Models;
public interface ICoreMaskService
{
ObservableCollection<CoreMask> AvailableMasks { get; }
CoreMask? DefaultMask { get; }
// Custom masks whose stored bit count no longer matches this machine's logical CPU count.
IReadOnlyList<string> MasksNeedingTopologyReview => [];
Task InitializeAsync();
Task<CoreMask> CreateMaskAsync(string name, string description, IEnumerable<bool> boolMask);
Task UpdateMaskAsync(CoreMask mask);
Task DeleteMaskAsync(string maskId);
CoreMask? GetMaskById(string maskId);
CoreMask? GetMaskByName(string name);
Task SaveMasksAsync();
Task LoadMasksAsync();
Task<bool> IsMaskReferencedByProfilesAsync(string maskId);
Task<bool> IsMaskActivelyAppliedAsync(string maskId);
Task<IEnumerable<string>> GetProfilesReferencingMaskAsync(string maskId);
Task UpdateProfilesToDefaultMaskAsync(string maskId);
Task CreateDefaultMasksAsync();
CoreMask? GetAllCoresMask();
void RegisterMaskApplication(int processId, string maskId);
void UnregisterMaskApplication(int processId);
}
}