Can I use `std::this_thread::sleep_for()` with an MPI process?
问题 MPI runs my program with multiple processes. I'd one of these processes to sleep for a while so that it's using minimal CPU. std::this_thread::sleep_for() looks like what I want, but that thread bit looks a little sketchy in this context. Is it okay to do this? 回答1: This is perfectly OK to do - nothing should crash or hang as a result of it. However, your "so that it's using minimal CPU" is a little worrying. Are you running more MPI processes than you have hardware threads available to