jcechace
10/29/2018, 7:26 PMCouroutineScope
what if the coroutine is a method inside class? How is this going to behave?
class Watcher {
fun CoroutineScope.watcherStarted() = async {
}
}
bdawg.io
10/29/2018, 9:43 PMWatcher
. So one way you can do this: ...launch {
val watcher = Watcher()
watcher.run {
watcherStarted() // invokes the CoroutineScope extension from launch
}
}