Skip to content

Commit fa3ca98

Browse files
committed
doc(common): Explain how to clear a dirty cross-process lock.
1 parent cbd4722 commit fa3ca98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/matrix-sdk-common/src/cross_process_lock.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,12 @@ pub enum CrossProcessLockKind {
478478
/// obtained it again. The lock is marked as dirty. It means the value
479479
/// protected by the cross-process lock may need to be reloaded if
480480
/// synchronisation is important.
481+
///
482+
/// Until [`CrossProcessLock::clear_dirty`] is called,
483+
/// [`CrossProcessLock::is_dirty`], [`CrossProcessLock::try_lock_once`] and
484+
/// [`CrossProcessLock::spin_lock`] will report the lock as dirty. Put it
485+
/// differently: dirty once, dirty forever, unless
486+
/// [`CrossProcessLock::clear_dirty`] is called.
481487
Dirty(CrossProcessLockGuard),
482488
}
483489

0 commit comments

Comments
 (0)