title: pthread_join on two infinite loop threads?
body: <p>I just read <a href="https://stackoverflow.com/questions/1680224/posix-threads-problem/1680271#1680271">here</a> that when the main loop ends, any threads that have or have not had a chance to spawn are terminated. So I need to do a join on each thread to wait for it to return.</p>
  
  <p>My problem is, how will I write a program in which I create 2 threads that run in an infinite loop? If I wait to join on an infinite thread, the second one will never get a chance to be created!</p>