mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
* Resolve call undeclared routine testAndSet
* Fix undeclared field atomicType
(cherry picked from commit 851e515bba)
10 lines
170 B
Nim
10 lines
170 B
Nim
import atomics
|
|
|
|
type
|
|
AtomicWithGeneric*[T] = object
|
|
value: Atomic[T]
|
|
|
|
proc initAtomicWithGeneric*[T](value: T): AtomicWithGeneric[T] =
|
|
result.value.store(value)
|
|
|