poohbar
10/10/2018, 4:21 PMfun <A, B> Sequence<A>.pmap(f: suspend (A) -> B): Sequence<B> = runBlocking {
map { async(Dispatchers.Default) { f(it) } }.map { it.await() }
}
how come this says Suspension function can be called only within couroutine body
on the it.await()
call?Zach Klippenstein (he/him) [MOD]
10/10/2018, 4:24 PMDico
10/10/2018, 5:06 PMpoohbar
10/10/2018, 6:19 PM