mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
upd: [ipc] yield
This commit is contained in:
parent
2dd85adc52
commit
7d39e5395a
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user