jQuery in Action, 2nd edition*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes thread question 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 question" Watch "thread question" New topic
Author

thread question

Bing Lu
Ranch Hand

Joined: Oct 10, 2000
Posts: 42
If there's >=two thread waiting for an object's lock, and some
other thread(owner of the lock) comes in saying notify(), which thread will get the lock, can any1 tell me.
thanks
Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Hi Bing,
There is no way to say which thread will get the lock... remeber the behaviour of threads are System/Vendor dependent....
Aruna
Bing Lu
Ranch Hand

Joined: Oct 10, 2000
Posts: 42
So thread priority does not matter?
thanks
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
No, it does not. Priority is not a consideration while moving a thread from the waiting state to ready state.
Ajith


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
 
subject: thread question
 
Similar Threads
SCJP and SCBCD notes on PPT
2 thread instances using the same Runnable object
what will happen
facing diffculty to highlight background color of an excel cell
yield() in synchronized code - a Dan Chisholm question