Ensure std::threads are actually started before calling join() (otherwise they're designed to throw an exception).