Module crossbeam_epoch::epoch

source ·
Expand description

The global epoch

The last bit in this number is unused and is always zero. Every so often the global epoch is incremented, i.e. we say it “advances”. A pinned participant may advance the global epoch only if all currently pinned participants have been pinned in the current epoch.

If an object became garbage in some epoch, then we can be sure that after two advancements no participant will hold a reference to it. That is the crux of safe memory reclamation.

Structs

  • An atomic value that holds an Epoch.
  • Epoch 🔒
    An epoch that can be marked as pinned or unpinned.