Companion

object Companion

Functions

Link copied to clipboard
fun create(lifetime: Lifetime): LifetimeDefinition
Link copied to clipboard
fun define(lifetime: Lifetime, atomicAction: (LifetimeDefinition, Lifetime) -> Unit): LifetimeDefinition
Link copied to clipboard
fun defineIntersection(vararg lifetimes: Lifetime): LifetimeDefinition
fun defineIntersection(lifetime1: Lifetime, lifetime2: Lifetime): LifetimeDefinition

Creates an intersection of some lifetimes: new lifetime that terminate when either one terminates. Created lifetime inherits the smallest terminationTimeoutKind

Link copied to clipboard
fun getTerminationTimeoutMs(timeoutKind: LifetimeTerminationTimeoutKind): Long

Gets the actual value in milliseconds for termination timeout kind (short, long, etc).

Link copied to clipboard
fun intersect(vararg lifetimes: Lifetime): Lifetime
fun intersect(lifetime1: Lifetime, lifetime2: Lifetime): Lifetime

Creates an intersection of some lifetimes: new lifetime that terminate when either one terminates. Created lifetime inherits the smallest terminationTimeoutKind

Link copied to clipboard
fun setTerminationTimeoutMs(timeoutKind: LifetimeTerminationTimeoutKind, milliseconds: Long)

Sets the actual value in milliseconds for termination timeout kind (short, long, etc).

Link copied to clipboard
inline fun <T> using(block: (Lifetime) -> T): T

Properties

Link copied to clipboard
val Eternal: Lifetime
Link copied to clipboard
val Terminated: Lifetime
Link copied to clipboard
var waitForExecutingInTerminationTimeout: Long
Link copied to clipboard
var waitForExecutingInTerminationTimeoutMs: Long