Replaced stately-concurrency with atomicfu

This commit is contained in:
dankito 2024-08-19 22:34:30 +02:00
parent 35db7e17f2
commit 25b8a025fd
4 changed files with 13 additions and 6 deletions

View File

@ -1,6 +1,8 @@
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlinVersion"
id("org.jetbrains.kotlin.multiplatform")
id("org.jetbrains.kotlin.plugin.serialization") version "$kotlinVersion"
id("org.jetbrains.kotlinx.atomicfu")
id "maven-publish"
}
@ -69,8 +71,6 @@ kotlin {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation "co.touchlab:stately-concurrency:1.2.0"
implementation("io.ktor:ktor-client-core:$ktorVersion")
}
}

View File

@ -1,6 +1,6 @@
package net.dankito.banking.fints.model
import co.touchlab.stately.concurrency.AtomicInt
import kotlinx.atomicfu.atomic
import net.dankito.banking.fints.callback.FinTsClientCallback
import net.dankito.banking.fints.log.IMessageLogAppender
import net.dankito.banking.fints.log.MessageContext
@ -27,7 +27,7 @@ open class JobContext(
) : MessageBaseData(bank, product), IMessageLogAppender {
companion object {
private var JobCount = AtomicInt(0) // this variable is accessed from multiple threads, so make it thread safe
private val JobCount = atomic(0) // this variable is accessed from multiple threads, so make it thread safe
}

View File

@ -14,6 +14,7 @@ ktorVersion=2.3.12
kotlinxDateTimeVersion=0.6.0
# kotlinx-serialization 1.7.x requires Kotlin 2.0
kotlinxSerializationVersion=1.6.3
atomicfuVersion=0.25.0
klfVersion=1.5.1

View File

@ -1,8 +1,14 @@
pluginManagement {
val atomicfuVersion: String by settings
repositories {
mavenCentral()
gradlePluginPortal()
}
plugins {
id("org.jetbrains.kotlinx.atomicfu") version atomicfuVersion
}
}
rootProject.name = "fints4kProject"