title: How to stop and continue a pthread?
body: <p>I'm coding in C (actually in OOC which is then compiled to C).</p>
  
  <p>How do I instruct a thread to wait at a particular checkpoint until some other thread tells it to continue? </p>
  
  <p>I'm actually using a tight loop in the thread and polling a variable I'm changing from the main thread, but I think that is not well performing, right? Besides that, when I do a tight loop in a thread, should I include a sleep in the loop to avoid consuming much cpu power just looping?</p>