Skip to content

Commit ea7e11e

Browse files
committed
adjust code documentation
1 parent 216f0b4 commit ea7e11e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/std/src/sys/unix/locks/queue_rwlock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! * On some platforms (e.g. macOS), the lock is very slow.
1414
//!
1515
//! Therefore, we implement our own `RwLock`! Naively, one might reach for a
16-
//! spinlock, but those [are quite problematic] when the lock is contended.
16+
//! spinlock, but those [can be quite problematic] when the lock is contended.
1717
//! Instead, this readers-writer lock copies its implementation strategy from
1818
//! the Windows [SRWLOCK] and the [usync] library. Spinning is still used for the
1919
//! fast path, but it is bounded: after spinning fails, threads will locklessly
@@ -429,7 +429,7 @@ impl RwLock {
429429
// The next waiter is a writer. Remove it from the queue and wake it.
430430
let prev = match unsafe { tail.as_ref().prev.get() } {
431431
// If the lock was read-locked, multiple threads have invoked
432-
// `find_tail` above. Therefore, it is possible that one of
432+
// `find_tail` above. Therefore, it is possible that one of
433433
// them observed a newer state than this thread did, meaning
434434
// there is a set `tail` field in a node before `state`. To
435435
// make sure that the queue is valid after the link update

library/std/src/thread/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,8 +1290,8 @@ impl Thread {
12901290
Thread { inner }
12911291
}
12921292

1293-
/// Like the public [`park`], but callable on any handle. Used to allow
1294-
/// parking in TLS destructors.
1293+
/// Like the public [`park`], but callable on any handle. This is used to
1294+
/// allow parking in TLS destructors.
12951295
///
12961296
/// # Safety
12971297
/// May only be called from the thread to which this handle belongs.

0 commit comments

Comments
 (0)