fixed bug in threadpool.h