ghedeon
01/17/2019, 10:03 AMfun CoroutineScope.foo(): ReceiveChannel<Int> = produce {}
What if it's in a different class? Then the usage is ... strange? 🙂
class Bar{
fun CoroutineScope.foo(): ReceiveChannel<Int> = produce {}
}
.... coroutine scope ....
bar().run {
foo() ??
}
gildor
01/17/2019, 10:07 AMwith(bar()) { foo() }
ghedeon
01/17/2019, 10:08 AMwith
sometimes, @gildor, got ya)gildor
01/17/2019, 10:09 AMstreetsofboston
01/17/2019, 12:43 PMDico
01/17/2019, 3:57 PMbar.foo(scope)
might be preferableghedeon
01/17/2019, 6:53 PM