# Kotlin/kotlinx-atomicfu

The idiomatic way to use atomic operations in Kotlin

Repository: https://github.com/Kotlin/kotlinx-atomicfu
Canonical: https://ross.abutalabs.com/products/kotlinx-atomicfu
Language: Kotlin
License: NOASSERTION
License Family: other
Topics: kotlinx, atomic, kotlin
Last push: 2026-08-25T20:30:42+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 3313, "days_push": 8, "days_rel": 96, "gap_med": 42, "n_releases_24m": 10}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1109, forks 86 (observed 2026-08-28T04:03:37.219110+00:00)

## What it is
AtomicFU is a Kotlin multiplatform library and compiler plugin providing idiomatic, efficient atomic operations and locks across JVM, Native, JS, and Wasm. Atomic values are written as boxed values but compiled down to efficient platform-specific primitives like Java field updaters.

## Use cases
- use atomic variables in Kotlin multiplatform code
- implement lock-free concurrent data structures in Kotlin
- share mutable state safely across coroutines
- replace java.util.concurrent atomics with multiplatform equivalents
- add reentrant locks to Kotlin/Native and JS code
- compile atomics to efficient field updaters on JVM

## When to choose
- you need atomic operations in Kotlin Multiplatform projects targeting JVM, Native, JS, or Wasm
- you want idiomatic Kotlin APIs for atomics and locks with efficient compiled output
- you are building concurrent libraries or coroutine-based systems in Kotlin

## When to avoid
- your project uses Kotlin older than 2.2.0 or Gradle older than 8.2 and cannot upgrade
- you only target the JVM and prefer plain java.util.concurrent.atomic classes
- you need strict API stability guarantees, since the plugin is in beta

## Facets
- artifact type: library
- maturity: active
- function: concurrency, developer-tools
- domain: programming-languages, developer-tools, cross-platform
- platform: jvm, wasm, cross-platform
- tags: kotlin-multiplatform, atomic-operations, compiler-plugin, locks, jetbrains, nodejs

## Member repositories
- Kotlin/kotlinx-atomicfu (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:37.219110+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:43:32.800817+00:00, confidence not recorded.
  - readme: https://github.com/Kotlin/kotlinx-atomicfu (fetched 2026-08-28T04:03:37.219110+00:00, sha 7fa8bcfc7b79)
- Data as of 2026-08-30T08:39:29.467469+00:00.
