fixed segfault in threadpool.h