public override void changePriority(WorkerPriorityType priority) { base.changePriority(priority); if (_sourceDetector != null) { _sourceDetector.ChangePriority(priority); } }
/// <summary> /// sets the priority /// </summary> /// <param name="priority"></param> public void setPriority(WorkerPriorityType priority) { Util.ThreadSafeRun(this.priority, delegate { isSettingPriority = true; this.priority.SelectedIndex = (int)priority; isSettingPriority = false; }); }
/// <summary> /// catches the ChangePriority event from the progresswindow and forward it to the encoder class /// </summary> /// <param name="priority"></param> private void Pw_PriorityChanged(WorkerPriorityType priority) { try { currentProcessor.changePriority(priority); } catch (JobRunException e) { log.LogValue("Error attempting to change priority", e, ImageType.Error); } }
public void ChangePriority(WorkerPriorityType priority) { try { if (analyseThread != null && analyseThread.IsAlive) { analyseThread.Priority = OSInfo.GetThreadPriority(priority); } } catch (Exception) { // process could not be running anymore - ignore } }
/// <summary> /// changes the priority of the encoding process/thread /// </summary> /// <param name="priority">the priority to change to</param> /// <param name="error">output for any errors that might ocurr during this method</param> /// <returns>true if the priority has been changed, false if not</returns> public void changePriority(WorkerPriorityType priority) { if (this.processorThread == null || !processorThread.IsAlive) { return; } try { processorThread.Priority = OSInfo.GetThreadPriority(priority); } catch (Exception e) // process could not be running anymore { throw new JobRunException(e); } }
public static void GetJobPriority(Job oJob, out WorkerPriorityType oPriority, out bool lowIOPriority) { JobType oType = WorkerSettings.GetJobType(oJob); foreach (WorkerPriority oPrioritySettings in MainForm.Instance.Settings.WorkerPriority) { if (oPrioritySettings.JobType.Equals(oType)) { oPriority = oPrioritySettings.Priority; lowIOPriority = oPrioritySettings.LowIOPriority; return; } } oPriority = WorkerPriorityType.IDLE; lowIOPriority = true; }
public virtual void changePriority(WorkerPriorityType priority) { if (!IsRunning()) { return; } try { processThread.Priority = OSInfo.GetThreadPriority(priority); } catch (Exception e) // process could not be running anymore { throw new JobRunException(e); } }
public void changePriority(WorkerPriorityType priority) { if (!isRunning()) { return; } try { WorkerPriority.GetJobPriority(job, out WorkerPriorityType oPriority, out bool lowIOPriority); OSInfo.SetProcessPriority(proc, priority, lowIOPriority, iMinimumChildProcessCount); return; } catch (Exception e) // process could not be running anymore { throw new JobRunException(e); } }
public WorkerPriority(JobType _jobType, WorkerPriorityType _priority, bool _lowIOPriority) { this._jobType = _jobType; this._priority = _priority; this._lowIOPriority = _lowIOPriority; }