atomicSample.nim 170 B

12345678910
  1. import atomics
  2. type
  3. AtomicWithGeneric*[T] = object
  4. value: Atomic[T]
  5. proc initAtomicWithGeneric*[T](value: T): AtomicWithGeneric[T] =
  6. result.value.store(value)