We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9ea4fea + c38ecb6 commit 2f6f6f6Copy full SHA for 2f6f6f6
README.md
@@ -1,6 +1,7 @@
1
# kotlinx.coroutines
2
3
-[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
+[](https://kotlinlang.org/docs/components-stability.html)
4
+[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
5
[](https://www.apache.org/licenses/LICENSE-2.0)
6
[](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.1/pom)
7
[](http://kotlinlang.org)
docs/topics/channels.md
@@ -573,6 +573,7 @@ Now let's see how it works in practice:
573
import kotlinx.coroutines.*
574
import kotlinx.coroutines.channels.*
575
576
+//sampleStart
577
fun main() = runBlocking<Unit> {
578
val tickerChannel = ticker(delayMillis = 100, initialDelayMillis = 0) // create ticker channel
579
var nextElement = withTimeoutOrNull(1) { tickerChannel.receive() }
@@ -596,7 +597,9 @@ fun main() = runBlocking<Unit> {
596
597
598
tickerChannel.cancel() // indicate that no more elements are needed
599
}
600
+//sampleEnd
601
```
602
+{kotlin-runnable="true" kotlin-min-compiler-version="1.3"}
603
604
> You can get the full code [here](../../kotlinx-coroutines-core/jvm/test/guide/example-channel-10.kt).
605
>
docs/topics/exception-handling.md
@@ -28,6 +28,7 @@ It can be demonstrated by a simple example that creates root coroutines using th
28
```kotlin
29
30
31
32
@OptIn(DelicateCoroutinesApi::class)
33
fun main() = runBlocking {
34
val job = GlobalScope.launch { // root coroutine with launch
@@ -47,7 +48,9 @@ fun main() = runBlocking {
47
48
println("Caught ArithmeticException")
49
50
51
52
53
54
55
> You can get the full code [here](../../kotlinx-coroutines-core/jvm/test/guide/example-exceptions-01.kt).
56
kotlinx-coroutines-core/common/src/flow/operators/Limit.kt
@@ -109,7 +109,6 @@ public fun <T> Flow<T>.takeWhile(predicate: suspend (T) -> Boolean): Flow<T> = f
109
* emit(progress) // always emit progress
110
* !progress.isDone() // continue while download is not done
111
* }
112
- * }
113
* ```
114
*/
115
public fun <T, R> Flow<T>.transformWhile(
kotlinx-coroutines-core/common/src/flow/operators/Transform.kt
@@ -81,7 +81,7 @@ public fun <T> Flow<T>.onEach(action: suspend (T) -> Unit): Flow<T> = transform
81
82
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
83
84
- * will produce `[], [1], [1, 2], [1, 2, 3]]`.
+ * will produce `[], [1], [1, 2], [1, 2, 3]`.
85
*
86
* This function is an alias to [runningFold] operator.
87
@@ -94,7 +94,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
94
95
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
96
97
98
99
public fun <T, R> Flow<T>.runningFold(initial: R, @BuilderInference operation: suspend (accumulator: R, value: T) -> R): Flow<R> = flow {
100
var accumulator: R = initial
kotlinx-coroutines-debug/src/CoroutinesBlockHoundIntegration.kt
@@ -117,7 +117,7 @@ public class CoroutinesBlockHoundIntegration : BlockHoundIntegration {
117
private fun BlockHound.Builder.allowBlockingCallsInArrayChannel() {
118
for (method in listOf(
119
"pollInternal", "isEmpty", "isFull", "isClosedForReceive", "offerInternal", "offerSelectInternal",
120
- "enqueueSend", "pollInternal", "pollSelectInternal", "enqueueReceiveInternal", "onCancelIdempotent"))
+ "enqueueSend", "pollSelectInternal", "enqueueReceiveInternal", "onCancelIdempotent"))
121
{
122
allowBlockingCallsInside("kotlinx.coroutines.channels.ArrayChannel", method)
123
0 commit comments