lsm-tree-0.1.0.0: Log-structured merge-trees
Safe HaskellSafe-Inferred
LanguageGHC2021

Database.LSMTree.Internal.UniqCounter

Synopsis

Documentation

newtype UniqCounter m Source #

An atomic counter for producing Unique values.

Constructors

UniqCounter (PrimVar (PrimState m) Int) 

incrUniqCounter :: PrimMonad m => UniqCounter m -> m Unique Source #

Atomically, return the current state of the counter, and increment the counter.

data Unique Source #

A unique value derived from a UniqCounter.

uniqueToInt :: Unique -> Int Source #

Use specialised versions like uniqueToRunNumber where possible.