|
* 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>
|