• Post Reply Bookmark Topic Watch Topic
  • New Topic

thread priority  RSS feed

 
Gajendra Kangokar
Ranch Hand
Posts: 94
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
which thread has highest priority.
Is it the Thread with higher number (8) or lower number (5).
This might be a silly question,still I am confused.


Thank You
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gajendra, As per Thread source file, Maximum Priority is 10 and least is 1.

/**
* The minimum priority that a thread can have.
*/
public final static int MIN_PRIORITY = 1;

/**
* The default priority that is assigned to a thread.
*/
public final static int NORM_PRIORITY = 5;

/**
* The maximum priority that a thread can have.
*/
public final static int MAX_PRIORITY = 10;



So to answer your question, 5 is having less priority than 8
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!