job-isActive
True when job is still running/waiting.
GT-Sandbox-Snapshot
Code
package com.glassthought.sandbox
import gt.sandbox.util.output.Out
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
val out = Out.standard()
fun main() = runBlocking {
val job = launch {
out.info("hi from job")
}
delay(100)
out.info("IsActive: " + job.isActive.toString())
}
Command to reproduce:
gt.sandbox.checkout.commit 26b45b047c334cb1e7cc \
&& cd "${GT_SANDBOX_REPO}" \
&& cmd.run.announce "./gradlew run --quiet"
Recorded output of command:
[elapsed: 47ms][🥇/tname:main/tid:1][coroutine:unnamed] hi from job
[elapsed: 144ms][🥇/tname:main/tid:1][coroutine:unnamed] IsActive: false