On 22/03/2014 15:05, Quoth Nate:
Try using concurrency_hint = number of threads you'll create. At least with I/O Completion ports (Windows NT), only concurrency_hint threads can perform an asynchronous operation simultaneously. All other threads have to wait. The default constructor probably uses concurrency_hint = #processors but tbh I'm not sure. disclaimer: I'm also not sure if I/O Completion ports actually supports more threads than #processors. MSDN doesn't suggest that there's any limit.
It does. It's fairly common to allocate 1.5x or 2x #processors threads to the pool. What happens then is that Windows will keep up to #processors threads (or whatever other concurrency value you specify) processing from the completion port at all times -- if one of the worker threads goes to sleep on some resource other than the completion port itself (during the course of whatever processing it's doing) then it will allow one of the "extra" threads to be woken if needed.