Thread Priorities is not working in Windows 11 using java. So can i get patch

srikanth dhulipala venkatesa 0 Reputation points
2023-08-27T09:19:44.9733333+00:00
public class Main {
    public static void main(String[] args) {
        

        HighPriority highPriority = new HighPriority();
        Thread thread = new Thread(highPriority);
        thread.setPriority(Thread.MAX_PRIORITY);
        thread.start();

        LowPriority lowPriority = new LowPriority();
        Thread lThread = new Thread(lowPriority);
        lThread.setPriority(Thread.MIN_PRIORITY);
        lThread.start();

        NormPriority normPriority = new NormPriority();
        Thread nThread = new Thread(normPriority);
        nThread.setPriority(Thread.NORM_PRIORITY);
        nThread.start();

        for(int i = 0; i < 10; i++){
            System.out.println(Thread.currentThread().getName()+" "+i);
        }
    }
}


         public void run() {

 class LowPriority implements Runnable{
        public void run() {

class NormPriority implements Runnable {
		public void run() {


Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,766 Reputation points
    2023-08-28T10:21:55.8733333+00:00

    Hello there,

    The system treats all threads with the same priority as equal. The system assigns time slices in a round-robin fashion to all threads with the highest priority. If none of these threads are ready to run, the system assigns time slices in a round-robin fashion to all threads with the next highest priority.

    Similar discussion here

    https://learn.microsoft.com/en-us/answers/questions/1328496/windows-11-not-supporting-the-priority-concept-so

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.