Module flag_based

Module flag_based 

Source
Expand description

§Atomic Lend Cell

A thread-safe container that allows lending references to data across threads using epoch-based reclamation for safety verification without per-object reference counting.

This module provides two main types:

  • AtomicLendCell<T>: The owner that contains the data and can lend it out
  • AtomicBorrowCell<T>: A lightweight borrow of data that can be freely sent between threads

Unlike atomic reference counting, this implementation uses a single boolean flag to track the owner’s lifetime, reducing synchronization overhead while still ensuring safety.

Structs§

AtomicBorrowCell
A thread-safe reference to data contained in an AtomicLendCell
AtomicLendCell
A container that allows thread-safe lending of its contained value using epoch-based reclamation