public void AfterStartMining() { int pid = _miningProcess?.Id ?? -1; // TODO C# can have this shorter if (_affinityMask != 0 && pid != -1) { var okMsg = ProcessHelpers.AdjustAffinity(pid, _affinityMask); Logger.Info(_logGroup, $"Adjust Affinity returned: {okMsg.Item2}"); } }
public void AfterStartMining() { int pid = -1; if (_miningProcess != null && _miningProcess.Handle != null) { pid = _miningProcess.Handle.Id; } // TODO C# can have this shorter if (_affinityMask != 0 && pid != -1) { var(ok, msg) = ProcessHelpers.AdjustAffinity(pid, _affinityMask); // TODO log what is going on is it ok or not } }