Debugging threadpool issue