Closed giacomodrago closed 10 years ago
Still thinking about this. The pool is intentionally minimal and mostly a basis to build more specialized ones. Or at least that was my original intention. I guess querying the size on the other hand is trivial enough that it might be reasonable. The hardware_concurrency thing should probably be max(1, hardware_concurrency). Before I put it on github I actually had that default constructor. The issue was that hardware_concurency is allowed to return 0 (which at the time was exactly what it did on my install). So I figured if the user wants hardware_concurrency as default he can pass it and it's the stdlibs fault if it goes wrong :) as opposed to the thread pools for having a non sane default.
Thank you, I totally see your point. I'll fix the constructor in my fork. Congratulations for your excellent work!
Non necessary features, but nice-to-have