We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 963de2c commit 82bbd9cCopy full SHA for 82bbd9c
signal-hook-registry/src/half_lock.rs
@@ -181,6 +181,8 @@ impl<T> HalfLock<T> {
181
if iter % YIELD_EVERY == 0 {
182
thread::yield_now();
183
} else {
184
+ // Replaced by hint::spin_loop, but we want to support older compiler
185
+ #[allow(deprecated)]
186
atomic::spin_loop_hint();
187
}
188
src/flag.rs
@@ -247,6 +247,8 @@ mod tests {
247
fn wait_flag(flag: &AtomicBool) -> bool {
248
let start = Instant::now();
249
while !flag.load(Ordering::Relaxed) {
250
251
252
253
if Instant::now() - start > Duration::from_secs(1) {
254
// We reached a timeout and nothing happened yet.
0 commit comments