File tree Expand file tree Collapse file tree 4 files changed +8
-16
lines changed
kotlinx-coroutines-core/src/test/kotlin/guide Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 17
17
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
18
18
package guide.channel.example03
19
19
20
- import kotlinx.coroutines.experimental.CommonPool
21
- import kotlinx.coroutines.experimental.channels.produce
22
- import kotlinx.coroutines.experimental.runBlocking
20
+ import kotlinx.coroutines.experimental.*
21
+ import kotlinx.coroutines.experimental.channels.*
23
22
24
23
fun produceSquares () = produce<Int >(CommonPool ) {
25
24
for (x in 1 .. 5 ) send(x * x)
Original file line number Diff line number Diff line change 17
17
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
18
18
package guide.channel.example04
19
19
20
- import kotlinx.coroutines.experimental.CommonPool
21
- import kotlinx.coroutines.experimental.channels.ReceiveChannel
22
- import kotlinx.coroutines.experimental.channels.produce
23
- import kotlinx.coroutines.experimental.runBlocking
20
+ import kotlinx.coroutines.experimental.*
21
+ import kotlinx.coroutines.experimental.channels.*
24
22
25
23
fun produceNumbers () = produce<Int >(CommonPool ) {
26
24
var x = 1
Original file line number Diff line number Diff line change 17
17
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
18
18
package guide.channel.example05
19
19
20
- import kotlinx.coroutines.experimental.channels.ReceiveChannel
21
- import kotlinx.coroutines.experimental.channels.produce
22
- import kotlinx.coroutines.experimental.runBlocking
20
+ import kotlinx.coroutines.experimental.*
21
+ import kotlinx.coroutines.experimental.channels.*
23
22
import kotlin.coroutines.experimental.CoroutineContext
24
23
25
24
fun numbersFrom (context : CoroutineContext , start : Int ) = produce<Int >(context) {
Original file line number Diff line number Diff line change 17
17
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
18
18
package guide.channel.example06
19
19
20
- import kotlinx.coroutines.experimental.CommonPool
21
- import kotlinx.coroutines.experimental.channels.ReceiveChannel
22
- import kotlinx.coroutines.experimental.channels.produce
23
- import kotlinx.coroutines.experimental.delay
24
- import kotlinx.coroutines.experimental.launch
25
- import kotlinx.coroutines.experimental.runBlocking
20
+ import kotlinx.coroutines.experimental.*
21
+ import kotlinx.coroutines.experimental.channels.*
26
22
27
23
fun produceNumbers () = produce<Int >(CommonPool ) {
28
24
var x = 1 // start from 1
You can’t perform that action at this time.
0 commit comments