From 7d39e5395a16daaabf462f7b43b370f4a8fccb0c Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sun, 30 Oct 2022 12:26:43 +0800 Subject: [PATCH] upd: [ipc] yield --- include/libipc/spin_lock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libipc/spin_lock.h b/include/libipc/spin_lock.h index 9ae55bf..1e374d2 100644 --- a/include/libipc/spin_lock.h +++ b/include/libipc/spin_lock.h @@ -34,7 +34,7 @@ inline void yield(K &k) noexcept { else if (k < 32) { std::this_thread::yield(); } else { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); + std::this_thread::sleep_for(std::chrono::microseconds(1)); return; } ++k;