Show / Hide Table of Contents

Struct Epoch.Scope

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

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

Methods

| Edit this page View Source

Defer(Action)

Registers user action to be called at some point in future when the resource protected by the epoch is no longer available to any consumer.

Declaration
public void Defer(Action callback)
Parameters
Type Name Description
Action callback

The callback to enqueue.

Remarks

Invocation order of callbacks is not guaranteed.

Exceptions
Type Condition
ArgumentNullException

callback is null.

| Edit this page View Source

Defer<TWorkItem>(TWorkItem)

Registers user action to be called at some point in future when the resource protected by the epoch is no longer available to any consumer.

Declaration
public void Defer<TWorkItem>(TWorkItem workItem) where TWorkItem : struct, IThreadPoolWorkItem
Parameters
Type Name Description
TWorkItem workItem

The callback to enqueue.

Type Parameters
Name Description
TWorkItem

The type of the callback.

| Edit this page View Source

Defer<T>(T, Action<T>)

Registers user action to be called at some point in future when the resource protected by the epoch is no longer available to any consumer.

Declaration
public void Defer<T>(T arg, Action<T> callback)
Parameters
Type Name Description
T arg

The argument to be passed to the callback.

Action<T> callback

The callback to enqueue.

Type Parameters
Name Description
T
Remarks

Invocation order of callbacks is not guaranteed.

Exceptions
Type Condition
ArgumentNullException

callback is null.

| Edit this page View Source

RegisterForDiscard(Discardable)

Registers an object to be disposed at some point in future when the resource protected by the epoch is no longer available to any consumer.

Declaration
public void RegisterForDiscard(Epoch.Discardable discardable)
Parameters
Type Name Description
Epoch.Discardable discardable

An object to be disposed.

Exceptions
Type Condition
ArgumentNullException

discardable is null.

| Edit this page View Source

RegisterForDispose(IDisposable)

Registers an object to be disposed at some point in future when the resource protected by the epoch is no longer available to any consumer.

Declaration
public void RegisterForDispose(IDisposable disposable)
Parameters
Type Name Description
IDisposable disposable

An object to be disposed.

Exceptions
Type Condition
ArgumentNullException

disposable is null.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾