Skip to main content

Crate noxu_latch

Crate noxu_latch 

Source
Expand description

Internal component of the noxu database.

This crate is published only so the noxu umbrella crate can depend on it. Use noxu (noxu = "3") in applications; depend on this crate directly only if you are extending the engine internals. Its API may change without a major version bump.

Latching primitives for Noxu DB.

Latching primitives — exclusive and shared/exclusive latches used for B-tree node concurrency control.

Latches are expected to be held for short, defined periods of time. No deadlock detection is provided; it is the caller’s responsibility to sequence latch acquisition in an ordered fashion to avoid deadlocks.

Key properties:

  • Uses noxu_sync for the underlying lock primitives
  • Reentrancy prevention is enforced (panics on reentrant acquire)
  • Thread ownership tracking is always available via noxu_sync

Structs§

ExclusiveLatch
An exclusive (mutex-like) latch.
ExclusiveLatchGuard
RAII guard for an exclusive latch. Releases the latch when dropped.
LatchContext
Context information about a latch, used for debugging and diagnostics.
SharedLatch
A shared/exclusive (reader-writer) latch.
SharedLatchReadGuard
RAII guard for shared/read access. Releases when dropped.
SharedLatchWriteGuard
RAII guard for exclusive/write access. Releases when dropped.

Enums§

LatchError
Errors that can occur during latch operations.

Constants§

DEFAULT_LATCH_TIMEOUT
Default latch timeout.