All I can say is that what we have now is the result of decades of
trial-and-error
*in practice* of actual operations. This is not to say that I think it's
perfect and cannot be improved upon, of course. But other approaches *have*
been tried and failed. In the course of normal operation, the thread pool
tends to expand to the size needed for each system's actual concurrency level
and things run fine.
That having been said, if you have an idea, try it! Discussing it is good
too because we may have tried it before.
As for the use of volatile, the short answer is that I didn't know it existed
at the time. :) However, from what I understand about volatile, it isn't
a substitute for a guaranteed lock. It doesn't strictly enforce ordering
and it isn't guaranteed to be atomic. I may be wrong, of course. I just
did a bit of not-googling and came up with https://blog.regehr.org/archives/28
that says some of these things.
And I wouldn't mind looking at the non-goto thread code. Might be worth
it. I'm assuming you abused it with the load tester.