Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JQ+ Threads

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following may pause/stop the current thread?
1) Calling Thread.Yield()
2) Calling stop() on an object of class Thread
3) Calling someObject.wait()
4) Calling someObj.notify()
5) Calling waitForAll() on a MediaTracker Object
The answer is 1,2,3,5 .. but I would think the answer should just be 1,2,3 .. what is 'waitForAll()' just a user-defined method? Is that what I should assume? I assumed I missed something in the Thread section.
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JQPlus is correct. Most times when you see waitFor... type of methods, they are methods that will release locks until something has finished.
Bill
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks Bill!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic