Skip to content

Commit 878e02b

Browse files
committed
doc(common): Rephrase the documentation of cross_process_lock a little bit.
1 parent bbe8f17 commit 878e02b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
//! Collection of small helpers that implement store-based locks.
15+
//! A cross-process lock implementation.
1616
//!
1717
//! This is a per-process lock that may be used only for very specific use
1818
//! cases, where multiple processes might concurrently write to the same
@@ -21,15 +21,15 @@
2121
//! the same process, and it remains active as long as there's at least one user
2222
//! in a given process.
2323
//!
24-
//! The lock is implemented using time-based leases to values inserted in a
25-
//! store. The store maintains the lock identifier (key), who's the
26-
//! current holder (value), and an expiration timestamp on the side; see also
27-
//! `CryptoStore::try_take_leased_lock` for more details.
24+
//! The lock is implemented using time-based leases. The lock maintains the lock
25+
//! identifier (key), who's the current holder (value), and an expiration
26+
//! timestamp on the side; see also `CryptoStore::try_take_leased_lock` for more
27+
//! details.
2828
//!
2929
//! The lock is initially acquired for a certain period of time (namely, the
30-
//! duration of a lease, aka `LEASE_DURATION_MS`), and then a "heartbeat" task
30+
//! duration of a lease, aka `LEASE_DURATION_MS`), and then a heartbeat task
3131
//! renews the lease to extend its duration, every so often (namely, every
32-
//! `EXTEND_LEASE_EVERY_MS`). Since the tokio scheduler might be busy, the
32+
//! `EXTEND_LEASE_EVERY_MS`). Since the Tokio scheduler might be busy, the
3333
//! extension request should happen way more frequently than the duration of a
3434
//! lease, in case a deadline is missed. The current values have been chosen to
3535
//! reflect that, with a ratio of 1:10 as of 2023-06-23.

0 commit comments

Comments
 (0)