Getting Started
No install step: the module ships inside the compiler. Import what you need:
.rnx
import { AtomicInt } from "@std/sync";Quickstart
Copy this into a file or open it straight in the playground:
.rnx
import { AtomicInt } from "@std/sync";
let slot = AtomicInt.byId(8);
slot.set(1);
print(slot.cas(1, 2), slot.get());
print(slot.cas(1, 3), slot.get());