Skip to content

Commit cd314ab

Browse files
committed
Updated RwLock Docs
1 parent d34318d commit cd314ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libstd/sync/rwlock.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ use sys_common::rwlock as sys;
6363
/// assert_eq!(*w, 6);
6464
/// } // write lock is dropped here
6565
/// ```
66+
/// # Panics
67+
///
68+
/// This function might panic when called if the lock is already held by the current thread.
6669
#[stable(feature = "rust1", since = "1.0.0")]
6770
pub struct RwLock<T: ?Sized> {
6871
inner: Box<sys::RWLock>,

0 commit comments

Comments
 (0)