This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

thread question

 
Bing Lu
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 199
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So thread priority does not matter?
thanks
 
Ajith Kallambella
Sheriff
Posts: 5782
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it does not. Priority is not a consideration while moving a thread from the waiting state to ready state.
Ajith
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic