kotlinx.io.utils.Atomic.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlinx-io-jvm Show documentation
Show all versions of kotlinx-io-jvm Show documentation
IO support libraries for Kotlin
package kotlinx.io.utils
import java.util.concurrent.atomic.*
import kotlin.reflect.*
internal inline fun longUpdater(p: KProperty1): AtomicLongFieldUpdater {
return AtomicLongFieldUpdater.newUpdater(Owner::class.java, p.name)
}
internal fun getIOIntProperty(name: String, default: Int): Int =
try { System.getProperty("kotlinx.io.$name") }
catch (e: SecurityException) { null }
?.toIntOrNull() ?: default
© 2015 - 2025 Weber Informatics LLC | Privacy Policy