https://kotlinlang.org logo
#coroutines
Title
# coroutines
n

nfrankel

04/06/2017, 7:35 AM
i’ve played around and i’ve that now:
Copy code
var results = listOf<SearchResult>()
        runBlocking<Unit> {
            results = providers.map {
                async(CommonPool) {
                    it.search()
                }
            }.map { it.await() }
        }
        return results
a

adeln

04/06/2017, 7:39 AM
it should work
3 Views