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

vaskir

09/23/2018, 10:39 AM
Copy code
coroutineScope {
    (1..30)
        .map {
            async {
                print("offering $it...")
                queue.offer(it).await()
                println("offered $it")
            }
        }.awaitAll()
}
e

elizarov

09/23/2018, 1:53 PM
Nope. But you can easily extract this pattern into your own extension function.
3 Views