Will a thread continue to run after yield() for a while ?
Fox Hu
Ranch Hand
Joined: Jan 23, 2003
Posts: 49
posted
0
Will a thread continue to run after yield() for a while ?
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Originally posted by Neal Hanson: Will a thread continue to run after yield() for a while ?
Yes, the yield() method is a very polite method; it simply tells other threads that this thread took its share and now other threads can do whatever they want to do. If no other threads exist, yield() does nothing ... Typically yield() can be found in bodies of very computational bound loops and the like. kind regards
subject: Will a thread continue to run after yield() for a while ?