uninitialised variable terminating resulted in boolean value 'true' on certain occasions, triggering a terminate instead of join when ThreadPool::join() was called