Esempio n. 1
0
        private void SetThreadIoPriority(int ioPriority)
        {
            try
            {
                int tid = int.Parse(listThreads.SelectedItems[0].SubItems[0].Text);

                using (var thandle = new ThreadHandle(tid, OSVersion.MinThreadSetInfoAccess))
                    thandle.SetIoPriority(ioPriority);
            }
            catch (Exception ex)
            {
                PhUtils.ShowException("Unable to set the I/O priority of the thread", ex);
            }
        }