All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.kotlinx.io.utils.Atomic.kt Maven / Gradle / Ivy

There is a newer version: 0.1.16
Show newest version
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