Skip to content

Commit

Permalink
Remove mutex test since its behavior is unspecified.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phen-Ro committed Nov 10, 2023
1 parent fdb8e0a commit 2c1dbba
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions crates/epaint/src/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,6 @@ mod tests {
let _b = two.lock();
}

#[test]
#[should_panic]
#[ignore = "Documentation does not gaurantee panic. \"The exact behavior on locking a mutex in the thread which already holds the lock is left unspecified. However, this function will not return on the second call (it might panic or deadlock, for example).\""]
fn lock_reentry_single_thread() {
let one = Mutex::new(());
let _a = one.lock();
let _a2 = one.lock(); // panics
}

#[test]
fn lock_multiple_threads() {
use std::sync::Arc;
Expand Down

0 comments on commit 2c1dbba

Please sign in to comment.