Get rid of awaitAll() in documentation, rewrite `currentScope` section
Fixes #624
diff --git a/docs/composing-suspending-functions.md b/docs/composing-suspending-functions.md
index a6911c7..ef1b032 100644
--- a/docs/composing-suspending-functions.md
+++ b/docs/composing-suspending-functions.md
@@ -267,7 +267,6 @@
suspend fun concurrentSum(): Int = coroutineScope {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
- awaitAll(one, two)
one.await() + two.await()
}
```
@@ -327,9 +326,7 @@
println("Second child throws an exception")
throw ArithmeticException()
}
-
- awaitAll(one, two)
- one.await() + two.await()
+ one.await() + two.await()
}
```