ok thanks, think im starting to understand it a li...
# coroutines
m
ok thanks, think im starting to understand it a little bit more, would simply adding a spin-wait with a `yield()`/`delay(x)` be the right approach? what i was attempting to do was to make a launchable process where the caller can decide to run async/etc
Copy code
suspend fun doThing(sleepFor: String) {
  val process = ProcessBuilder().command("sleep", sleepFor).start()
  try {
    while (process.isAlive) {
      // yield() 
      delay(75L)
    }
    process.waitFor()
  } finally {
    if (process.isAlive) {
      process.destroy()
    }
  }
}