DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="5.17.0" />

 Epoch

public class Epoch
Implements epoch-based reclamation.
public abstract class Discardable : IThreadPoolWorkItem

Represents an object which lifetime is controlled by Epoch internal Garbage Collector.

Encapsulates actions deferred previously by Defer method and its overloads.

public struct Scope

Represents a scope of the region of code protected by the epoch.

public Epoch()

public Scope Enter(bool drainGlobalCache, out RecycleBin bin)

Enters the current epoch, but doesn't execute any deferred actions.

public Scope Enter(bool? drainGlobalCache = false)

Enters the current epoch, and optionally executes a deferred actions.

public void Enter(bool drainGlobalCache, out Scope scope)

Enters the current epoch, and optionally executes a deferred actions.

public void UnsafeClear()

Invokes all deferred actions across all epochs.

public Scope UnsafeEnter(bool drainGlobalCache = false)

Enters the current epoch, and optionally executes a deferred actions.