File tree 3 files changed +5
-5
lines changed
kotlinx-coroutines-core/common/src/channels
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ official JetBrains project] ( https://jb.gg/badges/official.svg )] ( https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub )
4
4
[ ![ GitHub license] ( https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat )] ( https://www.apache.org/licenses/LICENSE-2.0 )
5
5
[ ![ Download] ( https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.1 )] ( https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.6.1/pom )
6
- [ ![ Kotlin] ( https://img.shields.io/badge/kotlin-1.6.1 -blue.svg?logo=kotlin )] ( http://kotlinlang.org )
6
+ [ ![ Kotlin] ( https://img.shields.io/badge/kotlin-1.6.0 -blue.svg?logo=kotlin )] ( http://kotlinlang.org )
7
7
[ ![ Slack channel] ( https://img.shields.io/badge/chat-slack-green.svg?logo=slack )] ( https://kotlinlang.slack.com/messages/coroutines/ )
8
8
9
9
Library support for Kotlin coroutines with [ multiplatform] ( #multiplatform ) support.
10
- This is a companion version for the Kotlin ` 1.6.1 ` release.
10
+ This is a companion version for the Kotlin ` 1.6.0 ` release.
11
11
12
12
``` kotlin
13
13
suspend fun main () = coroutineScope {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import kotlinx.coroutines.selects.*
19
19
*/
20
20
internal open class ConflatedChannel <E >(onUndeliveredElement : OnUndeliveredElement <E >? ) : AbstractChannel<E>(onUndeliveredElement) {
21
21
protected final override val isBufferAlwaysEmpty: Boolean get() = false
22
- protected final override val isBufferEmpty: Boolean get() = value == = EMPTY
22
+ protected final override val isBufferEmpty: Boolean get() = lock.withLock { value == = EMPTY }
23
23
protected final override val isBufferAlwaysFull: Boolean get() = false
24
24
protected final override val isBufferFull: Boolean get() = false
25
25
@@ -139,5 +139,5 @@ internal open class ConflatedChannel<E>(onUndeliveredElement: OnUndeliveredEleme
139
139
// ------ debug ------
140
140
141
141
override val bufferDebugString: String
142
- get() = " (value=$value )"
142
+ get() = lock.withLock { " (value=$value )" }
143
143
}
Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ This API is experimental and it is may change before migrating out of experiment
362
362
Changes during experimental may have deprecation applied when possible, but it is not
363
363
advised to use the API in stable code before it leaves experimental due to possible breaking changes.
364
364
365
- If you have any suggestions for improvements to this experimental API please share them them on the
365
+ If you have any suggestions for improvements to this experimental API please share them on the
366
366
[ issue tracker] ( https://github.com/Kotlin/kotlinx.coroutines/issues ) .
367
367
368
368
<!-- - MODULE kotlinx-coroutines-core -->
You can’t perform that action at this time.
0 commit comments