How to define thread priority?

Thread Priorities:

  • Every Java thread has a priority that helps the operating system determine the order in which threads are scheduled.
  • Java priorities are in the range between MIN_PRIORITY (a constant of 1) and MAX_PRIORITY (a constant of 10). By default, every thread is given priority NORM_PRIORITY (a constant of 5).
  • Threads with higher priority are more important to a program and should be allocated processor time before lower-priority threads. However, thread priorities cannot guarantee the order in which threads execute and very much platform dependent.

1 Comment

  • Thanks for sharing superb informations. Your web-site is very cool. I am impressed by the details that you have on this website. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found just the info I already searched all over the place and simply could not come across. What a perfect web site.

Leave a Reply