hey Guys, just realized some weird behavior with S...
# arrow-contributors
m
hey Guys, just realized some weird behavior with STM and Atomic objects, not sure if I’m doing something wrong but decided to make a quick test and it’s not passing, here is the code 🧵
concurrencytest.kt.cpp
I’d expect that both assertion are true (I’m testing this with KMP targeting jvm, btw) cc @Alejandro Serrano Mena @raulraja @simon.vergauwen
the outcome of the test is as follows:
Copy code
1) expected:<100000> but was:<542345>
2) expected:<100000> but was:<542345>
(3rd assertion succeeds as expected)
perhaps AtomicInt is not compatible with STM and I need to use TVar instead?
a
indeed, `Atomic`s are not tracked by STM, so it's allowed to perform concurrent transactions when using those
🙏🏻 1