• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Thread.yield()

 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it guaranteed that a call to Thread.yield() will cause the currently
running thread to give up and give a chance to other threads in the
ready to run state a chance to run.
 
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vishnu prakash:
Is it guaranteed that a call to Thread.yield() will cause the currently
running thread to give up and give a chance to other threads in the
ready to run state a chance to run.



There's no guarantee, and it's only supposed to affect threads that have the same priority level anyway. See the S&B book, pp. 511-513 (you do have that, right?).
 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI PERE
whats the S&B book.
is it available on net?
give me the authors full name
 
Pete Knecht
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's the book that I think most people around here are using:
Kathy Sierra & Bert Bates "Sun Certified Programmer & Developer for Java 2 Study Guide" from Osborne Certification press.

Here's a link to it so you can see what it looks like (you can get it any number of other places):
http://www.bookpool.com/sm/0072226846

Look, don't fool around. If you're prepping for the test, which you obviously seem to be, get the book. Best programming review book I've seen. I'm also studying for .NET certifications, and, OMG, MS people need to emulate this format for their own review books, which really are god-awful.
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually that is more famous as K&B , not S&B ....
reply
    Bookmark Topic Watch Topic
  • New Topic