summary refs log tree commit diff stats
path: root/tests/generics/tbintree.nim
diff options
context:
space:
mode:
authorElijah Shaw-Rutschman <elijahr@gmail.com>2020-08-18 11:02:10 -0500
committerGitHub <noreply@github.com>2020-08-18 18:02:10 +0200
commit8a004e2fc07c87b8308c3c03e4448372a2094383 (patch)
tree4c0f830ec3759b84f02c323ef0cca94930f6f3a8 /tests/generics/tbintree.nim
parentddff13f01b4704dbe22d8b6c86a606675a1700b0 (diff)
downloadNim-8a004e2fc07c87b8308c3c03e4448372a2094383.tar.gz
Add test coverage for atomics (#15193)
* Add test coverage for atomics

Signed-off-by: Elijah Shaw-Rutschman <elijahr@gmail.com>

* Fix compareExchange bugs for non-trivial objects

Bugs fixed:

1. compareExchange would not set the desired value in the success case.
2. compareExchange would not set var expected to the found value in the failure case.
3. withLock would spin forever running the unit tests. try..body..finally prevents this. Not sure why this makes a difference, since an exception wasn’t being raised, but clearing the guard in a finally block seems correct anyways.

Signed-off-by: Elijah Shaw-Rutschman <elijahr@gmail.com>
Diffstat (limited to 'tests/generics/tbintree.nim')
0 files changed, 0 insertions, 0 deletions