Merge "work around tsan+std::thread bug"