File tree 1 file changed +8
-0
lines changed
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> {
136
136
/// This function will return an error if the RwLock is poisoned. An RwLock
137
137
/// is poisoned whenever a writer panics while holding an exclusive lock.
138
138
/// 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.
139
143
#[ inline]
140
144
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
141
145
pub fn read ( & self ) -> LockResult < RwLockReadGuard < T > > {
@@ -188,6 +192,10 @@ impl<T: ?Sized> RwLock<T> {
188
192
/// This function will return an error if the RwLock is poisoned. An RwLock
189
193
/// is poisoned whenever a writer panics while holding an exclusive lock.
190
194
/// 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.
191
199
#[ inline]
192
200
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
193
201
pub fn write ( & self ) -> LockResult < RwLockWriteGuard < T > > {
You can’t perform that action at this time.
0 commit comments