Skip to content

Commit 4d821e3

Browse files
authored
Merge pull request #29 from cbeust/patch-1
Update coroutines-guide.md
2 parents d6b5a7b + fa0b28f commit 4d821e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

coroutines-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ Alternatively, we could have run pipeline coroutines as
10231023

10241024
### Prime numbers with pipeline
10251025

1026-
Let's take pipelines to the extreme, with an example that generates prime numbers using a pipeline
1026+
Let's take pipelines to the extreme with an example that generates prime numbers using a pipeline
10271027
of coroutines. We start with an infinite sequence of numbers. This time we introduce an
10281028
explicit context parameter, so that caller can control where our coroutines run:
10291029

@@ -1048,7 +1048,7 @@ fun filter(context: CoroutineContext, numbers: ReceiveChannel<Int>, prime: Int)
10481048
```
10491049

10501050
Now we build our pipeline by starting a stream of numbers from 2, taking a prime number from the current channel,
1051-
and launching new pipeline stage for each prime number found. The following example prints first ten prime numbers,
1051+
and launching new pipeline stage for each prime number found. The following example prints the first ten prime numbers,
10521052
running the whole pipeline in the context of the main thread:
10531053

10541054
```kotlin
@@ -1154,7 +1154,7 @@ suspend fun sendString(channel: SendChannel<String>, s: String, time: Long) {
11541154
}
11551155
```
11561156

1157-
Now, let us see what happen if we launch a couple of coroutines sending strings
1157+
Now, let us see what happens if we launch a couple of coroutines sending strings
11581158
(in this example we launch them in the context of the main thread):
11591159

11601160
```kotlin

0 commit comments

Comments
 (0)