We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9ae3fe commit c49887dCopy full SHA for c49887d
library/std/src/sys/unix/futex.rs
@@ -14,6 +14,8 @@ pub fn futex_wait(futex: &AtomicI32, expected: i32, timeout: Option<Duration>) -
14
use crate::sync::atomic::Ordering::Relaxed;
15
16
// Calculate the timeout as an absolute timespec.
17
+ //
18
+ // Overflows are rounded up to an infinite timeout (None).
19
let timespec =
20
timeout.and_then(|d| Some(Timespec::now(libc::CLOCK_MONOTONIC).checked_add_duration(&d)?));
21
0 commit comments