tatomics1.nim 110 B

12345678910
  1. discard """
  2. targets: "c cpp js"
  3. """
  4. var x = 10
  5. atomicInc(x)
  6. doAssert x == 11
  7. atomicDec(x)
  8. doAssert x == 10