| Author |
Thread Q
|
Nitin Bhagwat
Ranch Hand
Joined: Sep 09, 2004
Posts: 132
|
|
True or False: If two threads are blocked in the wait method of one object, and another thread executes the notify method on the same object, then the first thread that executed the wait call first definitely resumes execution as a direct and sole consequence of the notify call. Answer given is false. I believe it is true. Can any one confirm it please? Thank you in advance.
|
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
|
 |
Jayesh Lalwani
Ranch Hand
Joined: Nov 05, 2004
Posts: 502
|
|
The key here is "definetly" I beleive that the answer depends on the JVM and the OS. So, when you are writing your platform-independent code, you cannot definetly say that the first thread going into the wait will be the first to resume execution
|
 |
 |
|
|
subject: Thread Q
|
|
|