From 330f78f3334bcdcdb4cc2ab2dbf66604e0224d71 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期五, 21 五月 2021 16:21:45 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/valib/bhshmq
---
src/shm_queue.h | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/shm_queue.h b/src/shm_queue.h
index 5c9e077..3a2cea6 100644
--- a/src/shm_queue.h
+++ b/src/shm_queue.h
@@ -30,7 +30,6 @@
template <class D>
using Circular = boost::circular_buffer<D, Allocator<D>>;
-// using Circular = robust::CircularBuffer<D, Allocator<D>>;
template <class D>
class SharedQueue
@@ -47,7 +46,7 @@
if (TryRead(d)) {
return true;
} else {
- robust::QuickSleep();
+ std::this_thread::sleep_for(1ms);
}
} while (steady_clock::now() < end_time);
return false;
@@ -76,7 +75,6 @@
private:
Circular<D> queue_;
- // bhome_shm::Mutex mutex_;
};
template <int Power = 4>
@@ -97,7 +95,7 @@
return true;
}
}
- robust::QuickSleep();
+ std::this_thread::sleep_for(1ms);
} while (steady_clock::now() < end_time);
return false;
}
--
Gitblit v1.8.0