コード例 #1
0
        public static int GetAvailableCpusForProcess()
        {
            var result = SchedulerInterop.GetAvailableCpusForProcess();

            result.ThrowOnError();
            return(result.Value);
        }
コード例 #2
0
 public static PosixResult TryClearCurrentThreadAffinity()
 {
     return(SchedulerInterop.ClearCurrentThreadAffinity());
 }
コード例 #3
0
 public static PosixResult TrySetCurrentThreadAffinity(int cpuId)
 {
     return(SchedulerInterop.SetCurrentThreadAffinity(cpuId));
 }