Resolve cross file resolution errors in atomics (#19422) [backport:1.6]
* Resolve call undeclared routine testAndSet * Fix undeclared field atomicType
This commit is contained in:
parent
4a38092ac1
commit
851e515bba
3 changed files with 27 additions and 10 deletions
9
tests/stdlib/concurrency/atomicSample.nim
Normal file
9
tests/stdlib/concurrency/atomicSample.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import atomics
|
||||
|
||||
type
|
||||
AtomicWithGeneric*[T] = object
|
||||
value: Atomic[T]
|
||||
|
||||
proc initAtomicWithGeneric*[T](value: T): AtomicWithGeneric[T] =
|
||||
result.value.store(value)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue