We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d14e7f3 commit 74f8fc1Copy full SHA for 74f8fc1
library/std/src/sys/pal/unix/pi_futex.rs
@@ -33,7 +33,14 @@ pub fn futex_lock(futex: &AtomicU32) -> io::Result<()> {
33
)
34
}) {
35
Ok(_) => return Ok(()),
36
- Err(e) if e.raw_os_error() == Some(libc::EINTR) => continue,
+ Err(e)
37
+ if e.raw_os_error().is_some_and(|errno| {
38
+ errno == libc::EINTR // interrupted by signal
39
+ || errno == libc::EAGAIN // owner dying, need to try again; mutex is going to be poisoned
40
+ }) =>
41
+ {
42
+ continue;
43
+ }
44
Err(e) => return Err(e),
45
}
46
0 commit comments