summary refs log tree commit diff stats
path: root/tests/stdlib/concurrency/atomicSample.nim
blob: d56d867df3e8ca04c4a541c3e148b34014c44ac4 (plain) (blame)
1
2
3
4
5
6
7
8
9
import atomics

type
  AtomicWithGeneric*[T] = object
    value: Atomic[T]

proc initAtomicWithGeneric*[T](value: T): AtomicWithGeneric[T] =
  result.value.store(value)