diff options
| author | bors <bors@rust-lang.org> | 2016-10-14 16:15:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-14 16:15:42 -0700 |
| commit | a8d189af90841ca15f8d9dcc77628613f25e6b78 (patch) | |
| tree | 5fe5b973f3603bfbacc24b11b63c3dcfa10bc840 /src/libstd/sync | |
| parent | 40cd1fdf0a951e2aa1a042c4cba613f5a2d50dcf (diff) | |
| parent | 881f0f81f05dbc8288f2076ce439910536de287d (diff) | |
| download | rust-a8d189af90841ca15f8d9dcc77628613f25e6b78.tar.gz rust-a8d189af90841ca15f8d9dcc77628613f25e6b78.zip | |
Auto merge of #37170 - jonathandturner:rollup, r=jonathandturner
Rollup of 10 pull requests - Successful merges: #36307, #36755, #36961, #37102, #37115, #37119, #37122, #37123, #37141, #37159 - Failed merges:
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 48ecae185f9..f08b7641521 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -136,6 +136,10 @@ impl<T: ?Sized> RwLock<T> { /// This function will return an error if the RwLock is poisoned. An RwLock /// is poisoned whenever a writer panics while holding an exclusive lock. /// The failure will occur immediately after the lock has been acquired. + /// + /// # Panics + /// + /// This function might panic when called if the lock is already held by the current thread. #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn read(&self) -> LockResult<RwLockReadGuard<T>> { @@ -188,6 +192,10 @@ impl<T: ?Sized> RwLock<T> { /// This function will return an error if the RwLock is poisoned. An RwLock /// is poisoned whenever a writer panics while holding an exclusive lock. /// An error will be returned when the lock is acquired. + /// + /// # Panics + /// + /// This function might panic when called if the lock is already held by the current thread. #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn write(&self) -> LockResult<RwLockWriteGuard<T>> { |
