public void UnregisterThread(int ThreadId) => AffectedThreads.Remove(ThreadId);
 public void UnregisterThread(int id)
 {
     AffectedThreads.Remove(id);
 }