View Single Post
  #7   Spotlight this post!  
Unread 12-12-2012, 16:45
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Quick Question about Threads

Thread.yield() tells the CPU to pause the current thread and allow other threads to run. See : http://stackoverflow.com/questions/4...sleep0-in-java

Unless that is what you are going for, I'm thinking that yield() doesn't find any other threads to run, so it just runs right away, making the loop incredibly fast (100% usage).
__________________
All opinions are my own.
Reply With Quote