fixed failed assertion during thread pool destruction