コード例 #1
0
        public void ScheduleProcess(ClusterInterface.ISchedulerProcess ip,
                                    List <ClusterInterface.Affinity> affinities,
                                    ClusterInterface.RunProcess onScheduled)
        {
            Process process = ip as Process;

            Task.Run(() => ScheduleProcessInternal(process, affinities, onScheduled));
        }
コード例 #2
0
        public void CancelProcess(ClusterInterface.ISchedulerProcess ip)
        {
            Process process = ip as Process;

            lock (process)
            {
                if (process.Unclaimed)
                {
                    // it is still sitting in scheduling queues; unblock it with a dummy process
                    process.Claim(dummyCancelComputer);
                }
            }
        }