Skip to content

Commit 055aac3

Browse files
committed
fix docs
1 parent 2a0fdf9 commit 055aac3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sync.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -634,19 +634,19 @@ pub trait RwLockExt<T>: rwlock_ext_sealed::Sealed {
634634
/// Lock this `RwLock` for reading in a manner that cannot deadlock with
635635
/// the Python interpreter.
636636
///
637-
/// Before attempting to lock the mutex, this function detaches from the
637+
/// Before attempting to lock the rwlock, this function detaches from the
638638
/// Python runtime. When the lock is acquired, it re-attaches to the Python
639-
/// runtime before returning the `LockResult`. This avoids deadlocks between
639+
/// runtime before returning the `ReadLockResult`. This avoids deadlocks between
640640
/// the GIL and other global synchronization events triggered by the Python
641641
/// interpreter.
642642
fn read_py_attached(&self, py: Python<'_>) -> Self::ReadLockResult<'_>;
643643

644644
/// Lock this `RwLock` for writing in a manner that cannot deadlock with
645645
/// the Python interpreter.
646646
///
647-
/// Before attempting to lock the mutex, this function detaches from the
647+
/// Before attempting to lock the rwlock, this function detaches from the
648648
/// Python runtime. When the lock is acquired, it re-attaches to the Python
649-
/// runtime before returning the `LockResult`. This avoids deadlocks between
649+
/// runtime before returning the `WriteLockResult`. This avoids deadlocks between
650650
/// the GIL and other global synchronization events triggered by the Python
651651
/// interpreter.
652652
fn write_py_attached(&self, py: Python<'_>) -> Self::WriteLockResult<'_>;
@@ -873,7 +873,7 @@ impl<T> RwLockExt<T> for std::sync::RwLock<T> {
873873
fn write_py_attached(&self, _py: Python<'_>) -> Self::WriteLockResult<'_> {
874874
// If try_write is successful or returns a poisoned rwlock, return them so
875875
// the caller can deal with them. Otherwise we need to use blocking
876-
// read lock, which requires detaching from the Python runtime to avoid
876+
// write lock, which requires detaching from the Python runtime to avoid
877877
// possible deadlocks.
878878
match self.try_write() {
879879
Ok(inner) => return Ok(inner),

0 commit comments

Comments
 (0)