about summary refs log tree commit diff
path: root/example
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-03-30 18:22:43 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2019-08-01 11:15:40 +0200
commit2f0093b8c2f44f560dd51b26ac1c6bb902513ec7 (patch)
treee900ec30f66ee3400e5fdeafe83dac57b484fccd /example
parent62166ed9c8cd1b495bddc3fcfb02f48d3fa0e043 (diff)
downloadrust-2f0093b8c2f44f560dd51b26ac1c6bb902513ec7.tar.gz
rust-2f0093b8c2f44f560dd51b26ac1c6bb902513ec7.zip
Test mutex locking
Diffstat (limited to 'example')
-rw-r--r--example/std_example.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/std_example.rs b/example/std_example.rs
index e28da13e4c8..63227acc4bd 100644
--- a/example/std_example.rs
+++ b/example/std_example.rs
@@ -6,6 +6,9 @@ use std::intrinsics;
 
 
 fn main() {
+    let mutex = std::sync::Mutex::new(());
+    mutex.lock().unwrap();
+
     let _ = ::std::iter::repeat('a' as u8).take(10).collect::<Vec<_>>();
     let stderr = ::std::io::stderr();
     let mut stderr = stderr.lock();