Struct Epoch.RecycleBin
Encapsulates actions deferred previously by Defer(Action) method and its overloads.
Implements
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.dll
Syntax
public readonly struct Epoch.RecycleBin : IThreadPoolWorkItem
Remarks
The action can be called at any point in time. The call does not necessarily have to be protected by the epoch scope.
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that the action is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceClear(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. |
ClearAsync()
Invokes deferred actions as parallel task.
Declaration
public Task ClearAsync()
Returns
Type | Description |
---|---|
Task | The task representing execution of deferred actions. |
QueueCleanup()
Queues invocation of deferred actions to the thread pool.
Declaration
public void QueueCleanup()