Show / Hide Table of Contents

Struct Epoch.RecycleBin

Encapsulates actions deferred previously by Defer(Action) method and its overloads, and the unmanaged resources to be released by NativeResourceManager.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Threading
Assembly: DotNext.dll
Syntax
public readonly struct Epoch.RecycleBin
Remarks

The action can be called at any point in time. The call does not necessarily have to be protected by the epoch scope. The bin must be cleared only once: clearing the copies of the same bin invokes the actions and releases the unmanaged resources more than once.

Properties

View Source

IsEmpty

Gets a value indicating that the action is empty.

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
bool

Methods

View Source

Clear(bool)

Invokes all deferred actions.

Declaration
public void Clear(bool throwOnFirstException = false)
Parameters
Type Name Description
bool throwOnFirstException

true if exceptions should immediately propagate; otherwise, false.

View Source

ClearAsync()

Invokes deferred actions as parallel task.

Declaration
public Task ClearAsync()
Returns
Type Description
Task

The task representing execution of deferred actions.

View Source

QueueCleanup()

Queues invocation of deferred actions to the thread pool.

Declaration
public void QueueCleanup()

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾