Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread priority Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread priority" Watch "Thread priority" New topic

Thread priority

Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327
Whenever a new Thread is created it get Normal Priority (5)
Is this right ?
anita narula

Joined: Nov 28, 2000
Posts: 10
No, it is not right. If the newly created thread is not set a priority in the constructor, then it gets the priority of the thread that created it.
Ash sav
Ranch Hand

Joined: Apr 14, 2001
Posts: 55
I agree with Angela.
If no explicity thread priority is specified for a thread, it is given the default priority of 5.Thread inherits the priority of its parent thread.
Hope this helps.
It is sorta covered in the JavaRanch Style Guide.
subject: Thread priority
Similar Threads
How can I control a CPU usages?
Thread Priority
Programming violations
very urgent - threads