Skip to main content

Module epoch

Module 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Β§

AtomicEpoch πŸ”’
An atomic value that holds an Epoch.
Epoch πŸ”’
An epoch that can be marked as pinned or unpinned.

Type AliasesΒ§

AtomicEpochRepr πŸ”’
EpochRepr πŸ”’
EpochReprSigned πŸ”’