Lifetime Status
Lifetime's lifecycle statuses. Lifetime is created in Alive status and eventually becomes Terminated. Status change is one way road: from lower ordinal to higher (Alive ->Canceling ->Terminating ->Terminated).
Entries
This status propagates instantly through all lifetime's children graph when LifetimeDefinition.terminate is invoked. Lifetime is in consistent state (no resources are terminated) but termination process is already began. All background activities that block termination (e.g. started with Lifetime.executeOrThrow, should be interrupted as fast as possible. That's why background activities must check Lifetime.isAlive or Lifetime.throwIfNotAlive quite ofter (200 ms is a good reference value).
Lifetime is in inconsistent state. Destruction begins: some resources are terminated, other not. All method throw exception or do nothing (e.g. Lifetime.onTerminationIfAlive).
Lifetime is fully terminated, all resources are disposed and method's behavior is the same as in Terminating state.
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.