title: Problems implementing a multi-threaded UDP server (threadpool?)
body: <p>I am writing an audio streamer (client-server) as a project of mine (C/C++),
  and I decided to make a multi threaded UDP server for this project.</p>
  
  <p>The logic behind this is that each client will be handled in his own thread.
  The problems I`m having are the interference of threads to one another.</p>
  
  <p>The first thing my server does is create a sort of a thread-pool; it creates 5
  threads that all are blocked automatically by a <code>recvfrom()</code> function,
  though it seems that, on most of the times when I connect another device
  to the server, more than one thread is responding and later on
  that causes the server to be blocked entirely and not operate further.</p>
  
  <p>It's pretty difficult to debug this as well so I write here in order
  to get some advice on how usually multi-threaded UDP servers are implemented.</p>
  
  <p>Should I use a mutex or semaphore in part of the code?  If so, where?</p>
  
  <p>Any ideas would be extremely helpful.</p>