Class Epoch
Implements epoch-based reclamation.
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.dll
Syntax
public sealed class Epoch
Constructors
View SourceEpoch()
Initializes a new EBR implementation.
Declaration
public Epoch()
Methods
View SourceEnter()
Enters the current epoch without the execution of the deferred actions.
Declaration
public Epoch.Scope Enter()
Returns
| Type | Description |
|---|---|
| Epoch.Scope | A scope that represents the current epoch. |
Remarks
This method is reentrant. It is recommended to call this method by the reader.
Exceptions
| Type | Condition |
|---|---|
| AggregateException | One or more deferred actions thrown an exception. |
UnsafeClear()
Invokes all deferred actions across all epochs.
Declaration
public void UnsafeClear()
Remarks
This method is not thread-safe and cannot be called concurrently with other threads entered a protected region with Enter(). The caller must ensure that all threads finished their work prior to this method.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Not all threads relying on the current instance finished their work. |
| AggregateException | One or more deferred actions throw an exception. |