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.
os_unfair_lock
1 parent d70fd08 commit 2b9ee8bCopy full SHA for 2b9ee8b
tests/pass-dep/concurrency/apple-os-unfair-lock.rs
@@ -14,8 +14,10 @@ fn main() {
14
libc::os_unfair_lock_assert_not_owner(lock.get());
15
}
16
17
- // `os_unfair_lock`s can be moved and leaked, even when locked,
18
- // as long as no operation is occurring on the lock:
+ // `os_unfair_lock`s can be moved and leaked.
+ // In the real implementation, even moving it while locked is possible
19
+ // (and "forks" the lock, i.e. old and new location have independent wait queues);
20
+ // Miri behavior differs here and anyway none of this is documented.
21
let lock = lock;
22
let locked = unsafe { libc::os_unfair_lock_trylock(lock.get()) };
23
assert!(locked);
0 commit comments