Skip to content

Commit bcde8c4

Browse files
committed
New atomicfu
1 parent 50fd769 commit bcde8c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kotlin_version=1.3.50
99

1010
# Dependencies
1111
junit_version=4.12
12-
atomicfu_version=0.13.0
12+
atomicfu_version=0.13.1
1313
html_version=0.6.8
1414
lincheck_version=2.0
1515
dokka_version=0.9.16-rdev-2-mpp-hacks

kotlinx-coroutines-core/common/src/sync/Semaphore.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ private class SemaphoreImpl(private val permits: Int, acquiredPermits: Int) : Se
169169
}
170170
}
171171

172-
private fun AtomicLong.updateIfLower(value: Long): Unit = loop { cur ->
173-
if (cur >= value || compareAndSet(cur, value)) return@loop
172+
private inline fun AtomicLong.updateIfLower(value: Long): Unit = loop { cur ->
173+
if (cur >= value || compareAndSet(cur, value)) return
174174
}
175175

176176
private class CancelSemaphoreAcquisitionHandler(

0 commit comments

Comments
 (0)