title: How should a thread pool be implemented in C?
body: <p>I'm programming in C++, but I'm only using pthread.h, no boost or C++11 threads.</p>
  
  <p>So I'm trying to use threads but based on one of my previous questions <a href="https://stackoverflow.com/questions/10434717/how-does-pthread-create-work">(link)</a>, this doesn't seem feasible since threads terminate right after completion of its task, and one of the more prevalent reasons to use a thread-pool implementation is to reduce thread-creation overhead by reusing these threads for multiple tasks.</p>
  
  <p>So is the only other way to implement this in C to use fork(), and create a pipe from the main to child processes? Or is there a way to set up a pipe between threads and their parent that I don't know about?</p>
  
  <p>Many thanks in advance!</p>