Skip to content

Commit 1b853f9

Browse files
committed
---
yaml --- r: 206452 b: refs/heads/beta c: 833fc27 h: refs/heads/master v: v3
1 parent 4e7e48b commit 1b853f9

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3030
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3131
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32-
refs/heads/beta: 30b883b93f94be643e4b29e32bc8dcdbf07bf1d9
32+
refs/heads/beta: 833fc273a7e63edea4f44e18112facdafe9185f6
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3535
refs/heads/tmp: 579e31929feff51dcaf8d444648eff8de735f91a

branches/beta/src/libstd/sync/rwlock.rs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,16 @@ impl<T: ?Sized> RwLock<T> {
171171
RwLockReadGuard::new(&*self.inner, &self.data)
172172
}
173173

174-
/// Attempts to acquire this lock with shared read access.
174+
/// Attempts to acquire this rwlock with shared read access.
175+
///
176+
/// If the access could not be granted at this time, then `Err` is returned.
177+
/// Otherwise, an RAII guard is returned which will release the shared access
178+
/// when it is dropped.
179+
///
180+
/// This function does not block.
175181
///
176-
/// This function will never block and will return immediately if `read`
177-
/// would otherwise succeed. Returns `Some` of an RAII guard which will
178-
/// release the shared access of this thread when dropped, or `None` if the
179-
/// access could not be granted. This method does not provide any
180-
/// guarantees with respect to the ordering of whether contentious readers
181-
/// or writers will acquire the lock first.
182+
/// This function does not provide any guarantees with respect to the ordering
183+
/// of whether contentious readers or writers will acquire the lock first.
182184
///
183185
/// # Failure
184186
///
@@ -219,9 +221,14 @@ impl<T: ?Sized> RwLock<T> {
219221

220222
/// Attempts to lock this rwlock with exclusive write access.
221223
///
222-
/// This function does not ever block, and it will return `None` if a call
223-
/// to `write` would otherwise block. If successful, an RAII guard is
224-
/// returned.
224+
/// If the lock could not be acquired at this time, then `Err` is returned.
225+
/// Otherwise, an RAII guard is returned which will release the lock when
226+
/// it is dropped.
227+
///
228+
/// This function does not block.
229+
///
230+
/// This function does not provide any guarantees with respect to the ordering
231+
/// of whether contentious readers or writers will acquire the lock first.
225232
///
226233
/// # Failure
227234
///

0 commit comments

Comments
 (0)