File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 13
13
//! * On some platforms (e.g. macOS), the lock is very slow.
14
14
//!
15
15
//! 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.
17
17
//! Instead, this readers-writer lock copies its implementation strategy from
18
18
//! the Windows [SRWLOCK] and the [usync] library. Spinning is still used for the
19
19
//! fast path, but it is bounded: after spinning fails, threads will locklessly
@@ -429,7 +429,7 @@ impl RwLock {
429
429
// The next waiter is a writer. Remove it from the queue and wake it.
430
430
let prev = match unsafe { tail. as_ref ( ) . prev . get ( ) } {
431
431
// 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
433
433
// them observed a newer state than this thread did, meaning
434
434
// there is a set `tail` field in a node before `state`. To
435
435
// make sure that the queue is valid after the link update
Original file line number Diff line number Diff line change @@ -1199,8 +1199,8 @@ impl Thread {
1199
1199
Thread { inner }
1200
1200
}
1201
1201
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.
1204
1204
///
1205
1205
/// # Safety
1206
1206
/// May only be called from the thread to which this handle belongs.
You can’t perform that action at this time.
0 commit comments