about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorNabeel Omer <nabeelkomer@gmail.com>2016-10-13 20:37:09 +0530
committerNabeel Omer <nabeelkomer@gmail.com>2016-10-13 20:37:09 +0530
commitcd314ab05834518dd20072684081af8afc9edb6c (patch)
tree758af17bb2f4586f09c668145fa49e37bef7bd8a /src/libstd/sync
parentd34318dd538bf4c9175e4138b3e4188ea8211620 (diff)
downloadrust-cd314ab05834518dd20072684081af8afc9edb6c.tar.gz
rust-cd314ab05834518dd20072684081af8afc9edb6c.zip
Updated RwLock Docs
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/rwlock.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 48ecae185f9..c5a03f72e29 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -63,6 +63,9 @@ use sys_common::rwlock as sys;
 ///     assert_eq!(*w, 6);
 /// } // write lock is dropped here
 /// ```
+/// # Panics
+///
+/// This function might panic when called if the lock is already held by the current thread.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct RwLock<T: ?Sized> {
     inner: Box<sys::RWLock>,