MonoDevelop에서 코드를 작성하고 System.Threading의 네임 스페이스를 사용하려고합니다. 나는이 간단한 코드 작성 :왜 스레드 우선 순위를 변경할 수 없습니까?
class MainClass {
public static void Main (string[] args) {
System.Threading.Thread thread=new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc));
Console.WriteLine(thread.Priority);//output current thread priority
thread.Priority=System.Threading.ThreadPriority.Highest;//change thread priority
Console.WriteLine(thread.Priority);//output current thread priority again
}
public static void ThreadProc() {
//make some operations
}
}
을하지만이 참조 : , 스레드 우선 순위가 변경되지 않았습니다있다
(OS : 우분투 12.10을). 스레드 우선 순위는 어떻게 변경합니까?
스레드에게 약간의 작업을주십시오. 그것은 매우 빨리 시작되고 끝나며 완성 된 실의 자아 성을 바꿀 수 없습니다. 또한 시도해보십시오 –
그는 아직 실을 시작하지 않았습니다. –