I have a question for you guys regarding the proce...
# coroutines
g
I have a question for you guys regarding the process stuff I brought up earlier, and more generally. if you have some code which can be structured as
Copy code
class LongRunningTaskHandle {
  fun start()
  suspend fun waitForFinish()
}
is it better to simply expose that as
Copy code
class LongRunningTaskHandle {
  suspend fun execute() { start(); waitForFinish(); }
}
such that callers who want async behaviour are forced to explicitly get it through
launch
, thereby avoiding the "I forgot to call the suspending function" bug?