Skip to main content

Module bounded_lock

Module bounded_lock 

Source

Structs§

LockTimeoutError
Details of a lock acquisition timeout returned by LockFailBehavior::ReturnError.

Enums§

LockFailBehavior
Determines how an operation handles a bounded-lock timeout.

Functions§

read
Acquire a read lock via a non-blocking spin loop with an adaptive timeout.
read_adaptive
read with another base budget, still stretched by the I/O health. read is this with the 10 s base; a test uses a short base to take the same contended path without waiting 10–20 s.
read_for
Acquire a read lock within an explicit hard budget.
read_timeout
The adaptive budget read waits for a contended lock: the 10 s base, stretched by crate::core::io_health::adaptive_timeout.
read_with_behavior
Acquire a read lock with explicit timeout behavior for this operation.
write
Acquire a write lock via a non-blocking spin loop with an adaptive timeout. See read() for design rationale (#1018).
write_adaptive
write() with another base budget, still stretched by the I/O health.
write_for
Acquire a write lock within an explicit hard budget.
write_timeout
The adaptive budget write() waits for a contended lock.
write_with_behavior
Acquire a write lock with explicit timeout behavior for this operation.