title: Why does pthread_create() sometimes give EAGAIN on Cygwin port?
body: <p>What does it mean when pthread_create() returns errno 11 (EAGAIN), "Resource temporarily unavailable"?</p>
  
  <p>I am porting my application to Cygwin from it working great on Centos 4.  Every once in a while, the application fails in its call to pthread_create(), but most of the time it works fine.</p>
  
  <p>What does this mean is going wrong?</p>
  
  <p>The Linux Centos 4 man page says:</p>
  
  <pre><code>   EAGAIN The  system  lacked  the  necessary  resources  to  create  another  thread,  or  the  system-imposed  limit  on  the  total  number of threads in a process
            {PTHREAD_THREADS_MAX} would be exceeded.
  </code></pre>
  
  <p>I doubt I am hitting PTHREAD_THREADS_MAX, so how could the Cygwin system run out of resources to create another thread?</p>