ibash
10/31/2018, 6:34 AMgroostav
11/02/2018, 5:12 AMthis: CoroutineScope
provided by runblocking
is captured by the closure in someOtherMethod
, so that code, as you've written it, compiles just fine for me.this@runBlocking
, or alternativel you can name it with a label
fun foo() = runBlocking myScope@ {
someOtherMethod {
this@myScope.async { //...|
}
}
}
ibash
11/04/2018, 11:31 PM