Skip to content

Commit c26749c

Browse files
committed
adjust code documentation
1 parent 7a1a3f0 commit c26749c

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

+2-2
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,8 @@ impl Thread {
11991199
Thread { inner }
12001200
}
12011201

1202-
/// Like the public [`park`], but callable on any handle. Used to allow
1203-
/// parking in TLS destructors.
1202+
/// Like the public [`park`], but callable on any handle. This is used to
1203+
/// allow parking in TLS destructors.
12041204
///
12051205
/// # Safety
12061206
/// May only be called from the thread to which this handle belongs.

0 commit comments

Comments
 (0)