File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ impl<T: ?Sized> RwLock<T> {
136136 /// This function will return an error if the RwLock is poisoned. An RwLock
137137 /// is poisoned whenever a writer panics while holding an exclusive lock.
138138 /// The failure will occur immediately after the lock has been acquired.
139+ ///
140+ /// # Panics
141+ ///
142+ /// This function might panic when called if the lock is already held by the current thread.
139143 #[ inline]
140144 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
141145 pub fn read ( & self ) -> LockResult < RwLockReadGuard < T > > {
@@ -188,6 +192,10 @@ impl<T: ?Sized> RwLock<T> {
188192 /// This function will return an error if the RwLock is poisoned. An RwLock
189193 /// is poisoned whenever a writer panics while holding an exclusive lock.
190194 /// An error will be returned when the lock is acquired.
195+ ///
196+ /// # Panics
197+ ///
198+ /// This function might panic when called if the lock is already held by the current thread.
191199 #[ inline]
192200 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
193201 pub fn write ( & self ) -> LockResult < RwLockWriteGuard < T > > {
You can’t perform that action at this time.
0 commit comments