inc and dec are atomic in JS backend (#16129)

This commit is contained in:
flywind 2020-11-25 21:09:03 +08:00 • committed by GitHub
commit 7848da7abe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -1774,7 +1774,7 @@ when not defined(nimscript):
when not declared(sysFatal):
include "system/fatal"
when notJSnotNims:
when not defined(nimscript):
{.push stackTrace: off, profiler: off.}
proc atomicInc*(memLoc: var int, x: int = 1): int {.inline,