File tree 3 files changed +6
-6
lines changed
kotlinx-coroutines-core/jvm/test/guide
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,14 @@ import kotlinx.coroutines.selects.*
63
63
64
64
fun CoroutineScope.fizz () = produce<String > {
65
65
while (true ) { // sends "Fizz" every 300 ms
66
- delay(300 )
66
+ delay(500 )
67
67
send(" Fizz" )
68
68
}
69
69
}
70
70
71
71
fun CoroutineScope.buzz () = produce<String > {
72
72
while (true ) { // sends "Buzz!" every 500 ms
73
- delay(500 )
73
+ delay(1000 )
74
74
send(" Buzz!" )
75
75
}
76
76
}
@@ -112,7 +112,7 @@ fizz -> 'Fizz'
112
112
fizz -> 'Fizz'
113
113
buzz -> 'Buzz!'
114
114
fizz -> 'Fizz'
115
- buzz -> 'Buzz! '
115
+ fizz -> 'Fizz '
116
116
```
117
117
118
118
<!-- - TEST -->
Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ import kotlinx.coroutines.selects.*
11
11
12
12
fun CoroutineScope.fizz () = produce<String > {
13
13
while (true ) { // sends "Fizz" every 300 ms
14
- delay(300 )
14
+ delay(500 )
15
15
send(" Fizz" )
16
16
}
17
17
}
18
18
19
19
fun CoroutineScope.buzz () = produce<String > {
20
20
while (true ) { // sends "Buzz!" every 500 ms
21
- delay(500 )
21
+ delay(1000 )
22
22
send(" Buzz!" )
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class SelectGuideTest {
18
18
" fizz -> 'Fizz'" ,
19
19
" buzz -> 'Buzz!'" ,
20
20
" fizz -> 'Fizz'" ,
21
- " buzz -> 'Buzz! '"
21
+ " fizz -> 'Fizz '"
22
22
)
23
23
}
24
24
You can’t perform that action at this time.
0 commit comments