Get rid of deprecated API where possible, add Channel.RENDEZVOUS
diff --git a/docs/basics.md b/docs/basics.md
index 30c4fdf..443a31f 100644
--- a/docs/basics.md
+++ b/docs/basics.md
@@ -115,7 +115,7 @@
the execution of the main function:
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> { // start main coroutine
+fun main(args: Array<String>) = runBlocking { // start main coroutine
GlobalScope.launch { // launch new coroutine in background and continue
delay(1000L)
println("World!")
@@ -154,7 +154,7 @@
wait (in a non-blocking way) until the background [Job] that we have launched is complete:
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main(args: Array<String>) = runBlocking {
val job = GlobalScope.launch { // launch new coroutine and keep a reference to its Job
delay(1000L)
println("World!")
@@ -194,7 +194,7 @@
in its scope complete. Thus, we can make our example simpler:
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> { // this: CoroutineScope
+fun main(args: Array<String>) = runBlocking { // this: CoroutineScope
launch { // launch new coroutine in the scope of runBlocking
delay(1000L)
println("World!")
@@ -217,7 +217,7 @@
while waiting for all children to complete.
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> { // this: CoroutineScope
+fun main(args: Array<String>) = runBlocking { // this: CoroutineScope
launch {
delay(200L)
println("Task from runBlocking")
@@ -255,7 +255,7 @@
use other suspending functions, like `delay` in this example, to _suspend_ execution of a coroutine.
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main(args: Array<String>) = runBlocking {
launch { doWorld() }
println("Hello,")
}
@@ -281,7 +281,7 @@
[currentScope] builder comes to help: it inherits current [CoroutineScope] from the coroutine context it is invoked.
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main(args: Array<String>) = runBlocking {
launchDoWorld()
println("Hello,")
}
@@ -306,7 +306,7 @@
Run the following code:
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main(args: Array<String>) = runBlocking {
repeat(100_000) { // launch a lot of coroutines
launch {
delay(1000L)
@@ -329,7 +329,7 @@
returns from the main function after some delay:
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main(args: Array<String>) = runBlocking {
GlobalScope.launch {
repeat(1000) { i ->
println("I'm sleeping $i ...")