diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h index e9d0cae8d..ebfac0146 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrix.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h @@ -97,6 +97,7 @@ struct general_matrix_matrix_producttask_info[tid].users to the number of threads to mark that all other threads are going to // use it. while (info->task_info[tid].users != 0) { + std::this_thread::yield(); } info->task_info[tid].users = threads; @@ -115,6 +116,7 @@ struct general_matrix_matrix_product 0) { while (info->task_info[i].sync != k) { + std::this_thread::yield(); } }