View Single Post
  #4   Spotlight this post!  
Unread 12-12-2012, 15:57
apples000's Avatar
apples000 apples000 is offline
Registered User
no team
 
Join Date: Mar 2012
Rookie Year: 2012
Location: United States
Posts: 222
apples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant future
Re: Quick Question about Threads

You're right, starting a thread in the constructor is wrong. It should be placed in a method named startVision instead of the constructor. Also, we're using thread.sleep instead of thread.yield because it seems to give us more consistent vision loop timings, but I'm not really sure why. It also keeps the cpu usage away from 100%. We know that the vision loop will slow down when other stuff starts up, but it's nice to be able to watch the cpu usage and see what functions use the most resources. What do you think the best way to free up the CPU?
Reply With Quote