Skip to content

Commit

Permalink
isNotAlive added to kt Lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
korifey committed Oct 21, 2019
1 parent 2aa24ad commit 875c8f2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ fun Lifetime.throwIfNotAlive() { if (status != Alive) throw CancellationExceptio
fun Lifetime.assertAlive() { assert(status == Alive) { "Not alive: $status" } }

val Lifetime.isAlive : Boolean get() = status == Alive
val Lifetime.isNotAlive : Boolean get() = status != Alive
val Lifetime.isEternal : Boolean get() = this === Lifetime.Eternal


Expand Down

0 comments on commit 875c8f2

Please sign in to comment.