threading icon indicating copy to clipboard operation
threading copied to clipboard

Deprecate or remove atomics?

Open planetis-m opened this issue 1 year ago • 3 comments

It seems that this module have fallen out of grace, with the respective RFC closed. Is it supposed to be deprecated in favor of std/atomics?

planetis-m avatar Jun 03 '23 14:06 planetis-m

I think so, yes.

Araq avatar Jun 05 '23 06:06 Araq

std/atomics and threading/atomics look very similar, but there are some differences:

  • std has an annoying mo prefix for memory orderings
  • std also supports non-trivial types, which is a bit of a footgun (see also https://github.com/nim-lang/RFCs/issues/445), although AtomType is a bit restrictive

So I like the threading version a bit better. If std/atomics should be preferred, it should at least be made stable.

konsumlamm avatar Aug 29 '23 16:08 konsumlamm

So I like the threading version a bit better. If std/atomics should be preferred, it should at least be made stable.

Yeah, let us do that.

Araq avatar Aug 30 '23 13:08 Araq