Synced
LifetimeScope
Section titled “LifetimeScope”
- Owns cancellation, tracked work and reverse-order resource retirement for one lifecycle.
Required contracts
Section titled “Required contracts”API: engine
Implements: System.IDisposable, System.IAsyncDisposable
Inherits: object
Project: Inno.Core.Execution
Declaration
Section titled “Declaration”public sealed class Inno.Core.Execution.LifetimeScope : System.IDisposable, System.IAsyncDisposableMembers
Section titled “Members”| Kind | Element | Description |
|---|---|---|
| Constructors | LifetimeScope.Constructor | Creates a lifetime with finite asynchronous admission capacity. |
| Methods | LifetimeScope.Cancel | Stops new registrations and invokes cancellation callbacks on the calling thread. |
| Methods | LifetimeScope.Dispose | Releases a quiescent lifetime in reverse registration order, continuing after ordinary cleanup failures. |
| Methods | LifetimeScope.DisposeAsync | Cancels and asynchronously drains tracked work before reverse-order release. |
| Methods | LifetimeScope.Own | Transfers disposal ownership of a resource to this lifetime. |
| Methods | LifetimeScope.RunAsync | Atomically admits and tracks asynchronous work under this owner’s cancellation boundary. |
| Methods | LifetimeScope.Track | Tracks work that must complete before this lifetime’s resources can be released. |
| Properties | LifetimeScope.cancellationToken | Gets cancellation shared by work owned by this lifetime. |
| Properties | LifetimeScope.isQuiescent | Gets whether all tracked work has completed and resources can retire synchronously. |
| Properties | LifetimeScope.peakTrackedWorkCount | Gets the largest simultaneous retained work count. |
| Properties | LifetimeScope.rejectedWorkCount | Gets work registrations rejected before ownership transfer by finite capacity. |
| Properties | LifetimeScope.trackedWorkCount | Gets retained work records, including faults awaiting final retirement reporting. |