aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes thread question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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).
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: thread question
 
Similar Threads
SCJP and SCBCD notes on PPT
facing diffculty to highlight background color of an excel cell
what will happen
yield() in synchronized code - a Dan Chisholm question
2 thread instances using the same Runnable object