call this_thread::yield at some points