nim-lang / threading

New atomics, thread primitives, atomic refcounting for --gc:arc/orc.
MIT License
73 stars 12 forks source link

Add new atomics #4

Closed planetis-m closed 3 years ago

planetis-m commented 3 years ago

Refs: https://github.com/nim-lang/RFCs/issues/170

Basically, support for complex types got removed. You should use any kind of lock instead. Pros: no need to make atomics non copyable/movable since that would be too restrictive. Cons: doesn't compile without --threads:on (as it uses system/atomics and that doesn't compile). Shouldn't be an issue if it becomes the default eventually. Known bugs: https://github.com/planetis-m/sync/issues/11 The test file comes from the stdlib.