title: how to pass data to running thread
body: <p>When using pthread, I can pass data at thread creation time.</p>
  
  <p>What is the proper way of passing new data to an already running thread?</p>
  
  <p>I'm considering making a global variable and make my thread read from that.</p>
  
  <p>Thanks</p>