I think the OP means that his original version works, just not under the debugger.
In reply to Re: Building a thread pool by benizi in thread Building a thread pool by barvin