File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments